Jump to content

500 error from time out?


Peter Knight
 Share

Recommended Posts

This is probably more a server issue with Plesk etc but relates to Processwire.

I have a very long web form which takes the average user 3-5 minutes to complete. I know it's crazy but it's a client-driven thing.

Occasionally, my client has been emailed by users that when they eventually his Submit, they get a general 500 server error.

I did some research and looked at some logs and it seems to be some type of time-out issue. I guess that makes sense if the form takes minutes to complete as the first two fields of the web form are attachment uploads. I'm thinking that attaching files establishes some type of session but that session expires by the time the web form is actually submitted.

Does that sound plausible enough?

I plan to suggest moving the attachment fields to the end of the email, disabling the webform CSFR too and seeing if things improve.

Does my theory about file uploads and session time outs sound plausible?

 

Link to comment
Share on other sites

Hi Peter,

It's hard to find something without the logs and the phpinfo() result, we can only make assumptions.

 

11 hours ago, Peter Knight said:

I did some research and looked at some logs and it seems to be some type of time-out issue

What say the logs ?

11 hours ago, Peter Knight said:

Does my theory about file uploads and session time outs sound plausible?

Could be something related to the PHP Garbage Collection mystery.. Hard to tell at this point and even worse with shared host.

 

Also, it's possible that Plesk have a script run by a CRON job which delete sessions EACH HOUR, that could be the issue too! ask your host about that or look into your panel.

A suggestion before starting scratching your head by modifying some values in the php.ini file would be to test the same form submission but with a different session handler configured, eg, SessionHandlerDB and SessionHandlerRedis. Setting up the last one for testing is quite simple, configure the Redis server on your computer to listen all interface (::1), open the right port (6379 by default) in your firewall/box and set the connection information in the config.php of your website, done, test it now.

 

And as always, if you want me to have a ninja session on your server settings, ping by PM ? 

 

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...