There has been an error processing your request Magento 2.3.4

{"0":"SQLSTATE[HY000] [2002] No such file or directory","1":"#1 Zend_Db_Adapter_Pdo_Mysql->_connect() called at [vendor\/magento\/framework\/DB\/Adapter\/Pdo\/Mysql.php:410]\n#2 Magento\\Framework\\DB\\Adapter\\Pdo\\Mysql->_connect() called at [vendor\/magento\/zendframework1\/library\/Zend\/Db\/Adapter\/Abstract.php:861]\n#3...

Im receiving this kinda errors on var/log there is bunch of similar errors…I dont know what does it says, can someone explain about this…How do i fix this

This type of error looks like a consequence/side-effect from MySQL hanging or crashing. Digging a little deeper into the logs might give you a hint towards the actual cause of MySQL hanging or crashing.

Thanks for the reply Craig,

I don’t understand anything, it ends similar to this

"url":"\/brands?brand=325&concern=523%2C525%2C542&product_list_order=position","script_name":"\/index.php","report_id":"021495a8ef8d699a5764f428792f0b580eaea7a002d2a1a496a3f113affd462a"}

is it something related to configuration of products, like they are misaligned/misconfigured. I guess so because brand is a Attribute and 325 is ID

I’m afraid that doesn’t give us much to go on. Please, include the bulk of the log at the relevant timestamp. Ensure that you check bhoth exception.log and system.log entries. And what exactly you were doing at the time the error occurred (to add some context)

Sure Craig,

I have attached the most recent error log, At this time the site was displaying There has been an error processing your request and after few sec it came back to normal. Also i have noticed that the RAM is dying to process this. Out of 3951 MB only 87 MB left | (free -m command)

ram usage

I remember couple months ago this was happened were i was adding products, it took too much time to save. then i click reload on browser, it displayed the error message on front end. Also I was not allowed to index or clear the cache for few sec… then it get back to normal. Same thing happened again on last 7th of march, were Some peoples/bot were trying to Create a new account using fake Russian word with some fake urls, The same message was displayed “There has been an error processing your request”, so i removed this customers, enabled the Captcha & Recaptch for Logins & Signups…Then i have decided to upgrade magneto version to V2.3.4 from 2.3. I figured there is bug on Theme and extensions also, But some errors are not related to any.

So, I guess it comes down to:

  • MySQL misconfiguration or
  • Something in Magento hogging MySQL resources

You might find some decent leads in the MySQL Slow Query Log that can point you in the right direction.

You may also benefit from slightly increasing your Innodb Buffer Pool Size from its default value to maybe double. e.g. 128M to 256M. Don’t go too high as you’ll do far more harm than good on a server with only 4GB of memory.

Hi Craig, thank you for the helping me,

  1. I’ll go through MySQL Slow Query Log, thanks for finding it for me.

  2. I did tried to increase innodb buffer pool size after watching your 36 Magento 2 tips video, The problem is that the value is not changed after saving still remains 128 MiB. is there any other way to change?

Can i modify etc/my.cnf max_connections=100 to some number, will it help. i saw people suggesting this on internet.

What size of RAM would you recommend for me? i have 6K+ of SKU’s.

I tried to increase Innodb Buffer Pool Size. to 256 MiB using phpmyadmin as root user, then on terminal sudo service mysql restart, nothing worked, the value is set back to default 128 MiB

Any changes you make in phpMyAdmin get reset when you restart mysql. You need to update your actual configuration file and then restart mysql.

1 Like

there is no my.cnf file on etc folder :face_with_monocle:

Your location will depend on your environment, such as your database manager (e.g. MySQL, MariaDB, Percona, etc…) and your Operating System (e.g. Ubuntu, CentOS, etc…). To help find the location of this file, I would recommend reaching out to https://unix.stackexchange.com.

However, if you originally followed this tutorial (How to install Magento 2.3 and build a web server), then you’ll want to edit: /etc/mysql/mysql.conf.d/mysqld.cnf

1 Like

Yeah that one helped me…Thank You :ok_hand:

Hi Craig, hope you doing good !

I did tried to increase innodb buffer pool size to 256M, the value have been saved successfully. but still also i’m getting “There has been an error processing your request” error message. Will it get fixed if i increase my RAM and CPU.

yes i did followed your video (How to install Magento 2.3 and build a web server)

Apologies for the delay in writing. Did you resolve your issue? If so, what steps did you take?

No Craig, I still have this problem, my site is under maintenance mode for long time.

Some people recommend me to modify env.php file [‘host’ => ‘localhost’, to ‘127.0.0.1’,], i don’t think its gonna work.

Help me if you found any solution.