Question

getting error 500 sometimes

Posted October 16, 2021 131 views
DigitalOcean

my page not working some time and give me error 500 and after a while works automatically please give me the solution

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
2 answers

We can help when you help us know why the 500 error is happening. There’s an error with your application, check the logs to see what specifically the error says

Hi @riyaloerp,

This seems strange but as @seanmavley, you’ll need to provide us a little bit more information. If you see Error 500, I’ll take a guess and say you are using Apache. Check your Apache error log and see what it says about the errors. It will for sure give you the exact reason behind it. You can find the log at /var/log/apache2/error_log

  • please check this i got this error log

    [Sun Oct 17 00:00:09.988971 2021] [ssl:warn] [pid 722486] AH01909: riyalomenu.com:443:0 server certificate does NOT include an ID which matches the server name
    [Sun Oct 17 00:00:09.993822 2021] [mpm_prefork:notice] [pid 722486] AH00163: Apache/2.4.41 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1i configured -- resuming normal operations
    [Sun Oct 17 00:00:09.993858 2021] [core:notice] [pid 722486] AH00094: Command line: '/usr/sbin/apache2'
    [Sun Oct 17 02:46:06.580887 2021] [core:error] [pid 985345] [client 45.146.164.110:38926] AH00126: Invalid URI in request POST /cgi-bin/.%2e/.%2e/.%2e/.%2e/bin/sh HTTP/1.1
    [Sun Oct 17 12:48:02.467486 2021] [php7:error] [pid 987711] [client 89.147.170.32:50384] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] No such file or directory in /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70\nStack trace:\n#0 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(70): PDO->__construct()\n#1 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(46): Illuminate\\Database\\Connectors\\Connector->createPdoConnection()\n#2 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(24): Illuminate\\Database\\Connectors\\Connector->createConnection()\n#3 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(182): Illuminate\\Database\\Connectors\\MySqlConnector->connect()\n#4 [internal function]: Illuminate\\Database\\Connectors\\ConnectionFactory->Illuminate\\Database\\Connectors\\{closure}()\n#5 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connection.php(919): call_user_fu in /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 664, referer: https://www.riyaloerp.com/shop/public/products/create
    [Sun Oct 17 12:48:02.476207 2021] [php7:error] [pid 983720] [client 188.135.33.78:61579] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] No such file or directory in /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70\nStack trace:\n#0 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(70): PDO->__construct()\n#1 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(46): Illuminate\\Database\\Connectors\\Connector->createPdoConnection()\n#2 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(24): Illuminate\\Database\\Connectors\\Connector->createConnection()\n#3 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(182): Illuminate\\Database\\Connectors\\MySqlConnector->connect()\n#4 [internal function]: Illuminate\\Database\\Connectors\\ConnectionFactory->Illuminate\\Database\\Connectors\\{closure}()\n#5 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connection.php(919): call_user_fu in /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 664
    [Sun Oct 17 12:48:02.487638 2021] [php7:error] [pid 983720] [client 188.135.33.78:61579] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] No such file or directory in /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70\nStack trace:\n#0 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(70): PDO->__construct()\n#1 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(46): Illuminate\\Database\\Connectors\\Connector->createPdoConnection()\n#2 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(24): Illuminate\\Database\\Connectors\\Connector->createConnection()\n#3 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(182): Illuminate\\Database\\Connectors\\MySqlConnector->connect()\n#4 [internal function]: Illuminate\\Database\\Connectors\\ConnectionFactory->Illuminate\\Database\\Connectors\\{closure}()\n#5 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connection.php(919): call_user_fu in /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 664
    [Sun Oct 17 12:48:02.494739 2021] [php7:error] [pid 987711] [client 89.147.170.32:50384] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] No such file or directory in /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70\nStack trace:\n#0 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(70): PDO->__construct()\n#1 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(46): Illuminate\\Database\\Connectors\\Connector->createPdoConnection()\n#2 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(24): Illuminate\\Database\\Connectors\\Connector->createConnection()\n#3 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(182): Illuminate\\Database\\Connectors\\MySqlConnector->connect()\n#4 [internal function]: Illuminate\\Database\\Connectors\\ConnectionFactory->Illuminate\\Database\\Connectors\\{closure}()\n#5 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connection.php(919): call_user_fu in /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 664, referer: https://www.riyaloerp.com/shop/public/products/create
    [Sun Oct 17 16:30:01.997193 2021] [php7:error] [pid 994855] [client 188.135.33.78:62455] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] No such file or directory in /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70\nStack trace:\n#0 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(70): PDO->__construct()\n#1 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(46): Illuminate\\Database\\Connectors\\Connector->createPdoConnection()\n#2 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(24): Illuminate\\Database\\Connectors\\Connector->createConnection()\n#3 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(182): Illuminate\\Database\\Connectors\\MySqlConnector->connect()\n#4 [internal function]: Illuminate\\Database\\Connectors\\ConnectionFactory->Illuminate\\Database\\Connectors\\{closure}()\n#5 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connection.php(919): call_user_fu in /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 664
    [Sun Oct 17 16:30:02.005266 2021] [php7:error] [pid 995201] [client 188.135.33.78:53332] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] No such file or directory in /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70\nStack trace:\n#0 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(70): PDO->__construct()\n#1 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(46): Illuminate\\Database\\Connectors\\Connector->createPdoConnection()\n#2 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(24): Illuminate\\Database\\Connectors\\Connector->createConnection()\n#3 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(182): Illuminate\\Database\\Connectors\\MySqlConnector->connect()\n#4 [internal function]: Illuminate\\Database\\Connectors\\ConnectionFactory->Illuminate\\Database\\Connectors\\{closure}()\n#5 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connection.php(919): call_user_fu in /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 664, referer: https://www.riyaloerp.com/shop/public/pos
    [Sun Oct 17 16:30:02.007645 2021] [php7:error] [pid 994855] [client 188.135.33.78:62455] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] No such file or directory in /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70\nStack trace:\n#0 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(70): PDO->__construct()\n#1 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(46): Illuminate\\Database\\Connectors\\Connector->createPdoConnection()\n#2 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(24): Illuminate\\Database\\Connectors\\Connector->createConnection()\n#3 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(182): Illuminate\\Database\\Connectors\\MySqlConnector->connect()\n#4 [internal function]: Illuminate\\Database\\Connectors\\ConnectionFactory->Illuminate\\Database\\Connectors\\{closure}()\n#5 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connection.php(919): call_user_fu in /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 664
    [Sun Oct 17 16:30:02.014873 2021] [php7:error] [pid 995201] [client 188.135.33.78:53332] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] No such file or directory in /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70\nStack trace:\n#0 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(70): PDO->__construct()\n#1 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(46): Illuminate\\Database\\Connectors\\Connector->createPdoConnection()\n#2 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(24): Illuminate\\Database\\Connectors\\Connector->createConnection()\n#3 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(182): Illuminate\\Database\\Connectors\\MySqlConnector->connect()\n#4 [internal function]: Illuminate\\Database\\Connectors\\ConnectionFactory->Illuminate\\Database\\Connectors\\{closure}()\n#5 /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connection.php(919): call_user_fu in /var/www/html/shop/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 664, referer: https://www.riyaloerp.com/shop/public/pos
    
    edited by KFSys