Jump to content

500 error from time out?

Peter Knight

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Similar Content

    • By Peter Knight
      I have a demo site which I moved to a new VPS for client testing
      We noticed that leaving a page open and then revisiting the site can result in a 25 second(ish) to load time and will then throw a 500 Error.
      The hosting guys had a look and confirmed that the server is fine but the issue could be related to authentication or sessions.
      We are running Page Protector and ProCache so I wondered if there were any known bugs here and any recommended actions.
      My actual PW log doesn't show anything but the server log has plenty of these
      2018-12-06 08:14:00 Error xxx.141.1x.101 500 POST /who-we-are/ HTTP/1.0     1.58 K Apache access 2018-12-06 08:14:45 Warning xxx.141.1x.131   mod_fcgid: read data timeout in 45 seconds, referer: http://demo.abc.not/who-we-are/       Apache error 2018-12-06 08:14:45 Error xxx.141.1x.131   End of script output before headers: index.php, referer: http://demo.abc.not/who-we-are/       Apache error 2018-12-06 09:03:18 Error xxx.141.1x.131   2614#0: *667 recv() failed (104: Connection reset by peer) while reading response header from upstream       nginx error Thanks
    • By JMH
      Hi all,
      I'm trying to upload an image to a blog post. The ProcessWire blog editing page is relatively simple. See attached. When I try to add more images and publish the post an internal server error is returned and a blank space is where the additional images should be. 
      Can anyone advise on how this can be resolved quickly.
      Please let me know any additional information you'd need. 
      Many thanks.

    • By melissa_boyle
      Hi Guys,
      I know this issue has been covered alot of times and I have read through all the previous threads however none of the solutions seem to work for me.
      I have migrated processwire from a local server to a subdomain multiple times and have never faced this issue.
      Basically on moving all the files and uncommenting the #Rewrite option in the .htaccess file I am still getting a 500 internal error message.
      I can't even see the homepage
      Does anyone have any ideas? The link to the site is: http://friendsocc.3sixtynearlythere.co.uk/
    • By icreation
      After upgrading from 2.3 to 2.5 on a site I have a 500 internal server error.
      All file permissions and ownership settings seem correct.
      I changed out the 'wire' directory and replaced the .htaccess and index.php files.
      Also I added a line to site/config.php 
        $config->httpHosts = array('acarchitects.biz', 'www.acarchitects.biz');   I have had to revert back to the original version meantime.   Is there anything that might have been missed?
  • Create New...