Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Random 500 Internal Server Error Rate Topic   - - - - -

 
  • siarlis
  • Junior Member
  • Members
  • Join Date: 26-Feb 10
  • 10 posts

Posted 28 May 2020 - 09:13 AM #1

Hello, 

 

Suddenly i start to receive a 500 Error . The problem occurs randomly . 

 

I've checked the error logs and it seems that there is a problem with the session variables ? 

 

Here is the log: 

 
[28-May-2020 08:55:08 UTC] PHP Notice:  Undefined index: settings in app/Tygh/Session.php on line 257
[28-May-2020 08:55:08 UTC] PHP Warning:  session_decode(): Cannot call session save handler in a recursive manner in app/Tygh/Web/Session.php on line 653
[28-May-2020 08:55:08 UTC] PHP Warning:  session_decode(): Session object destruction failed in app/Tygh/Web/Session.php on line 653
[28-May-2020 08:55:08 UTC] PHP Warning:  session_decode(): Failed to decode session object. Session has been destroyed in app/Tygh/Web/Session.php on line 653
[28-May-2020 08:55:08 UTC] PHP Notice:  Undefined index: settings in app/Tygh/Session.php on line 257
[28-May-2020 08:55:08 UTC] PHP Warning:  session_decode(): Failed to decode session object. Session has been destroyed in app/Tygh/Web/Session.php on line 653
[28-May-2020 08:55:08 UTC] PHP Notice:  Undefined index: settings in app/Tygh/Session.php on line 257
[28-May-2020 08:55:08 UTC] PHP Fatal error:  Allowed memory size of 5368709120 bytes exhausted (tried to allocate 12288 bytes) in app/Tygh/Backend/Database/Mysqli.php on line 91
 
Does anyone have the same problem ? 
 
Thank you for your time. 


 
  • harmsmitsdev
  • Senior Member
  • Members
  • Join Date: 22-Feb 20
  • 176 posts

Posted 28 May 2020 - 10:08 AM #2

How do you store your sessions?


harmsmitsdev@gmail.com


 
  • siarlis
  • Junior Member
  • Members
  • Join Date: 26-Feb 10
  • 10 posts

Posted 28 May 2020 - 10:24 AM #3

Hello, 

 

I use the database for backend session. 

 

I've tried to clear the cache and repair the session tables in mysql.

 

we use CS-cart version 4.7.4 with php 7.1

We host the website on a dedicated server.

 

Thank you for your response. 



 
  • harmsmitsdev
  • Senior Member
  • Members
  • Join Date: 22-Feb 20
  • 176 posts

Posted 28 May 2020 - 12:37 PM #4

Perhaps try using a solution like redis, its a bit less intensive on the database so it should reduce IO of MySQL.


harmsmitsdev@gmail.com


 
  • siarlis
  • Junior Member
  • Members
  • Join Date: 26-Feb 10
  • 10 posts

Posted 28 May 2020 - 01:59 PM #5

Hi, 

 

No luck with this, I am still getting the following errors: 

session_decode(): Cannot call session save handler in a recursive manner  in /app/Tygh/Web/Session.php on line 653

session_decode(): Session object destruction failed in /app/Tygh/Web/Session.php on line 653

session_decode(): Failed to decode session object. Session has been destroyed in app/Tygh/Web/Session.php on line 653
Undefined index: settings in app/Tygh/Session.php on line 257


 
  • harmsmitsdev
  • Senior Member
  • Members
  • Join Date: 22-Feb 20
  • 176 posts

Posted 28 May 2020 - 02:08 PM #6

 

Hi, 

 

No luck with this, I am still getting the following errors: 

session_decode(): Cannot call session save handler in a recursive manner  in /app/Tygh/Web/Session.php on line 653

session_decode(): Session object destruction failed in /app/Tygh/Web/Session.php on line 653

session_decode(): Failed to decode session object. Session has been destroyed in app/Tygh/Web/Session.php on line 653
Undefined index: settings in /usr/www/users/vdfnyp/app/Tygh/Session.php on line 257

Then there is no other way to say it, but you most likely have a faulty addon installed.


harmsmitsdev@gmail.com


 
  • siarlis
  • Junior Member
  • Members
  • Join Date: 26-Feb 10
  • 10 posts

Posted 29 May 2020 - 08:05 AM #7

Hi again, 

 

To anyone  has the same problem i've found a solution by truncating the sessions table. 

I can not understand why the problem exists in that table.  - maybe corrupted data ?

 

Making a simple test by creating a clone of the website helped me to realize the issue.