0

Using an opencart plugin I am getting these errors in my apache error log

Read POST information timed out

(22)Invalid argument: client stopped connection before rvputs completed

I just wanted to verify this is due to a client side http connection timeout when reading a large xml file.

Is there any configuration I can change server side to prevent this? Since it's related to a client side timeout I am doubtful.

My idea is to remove the http requirement altogether. I'm thinking of just running a cron script, or starting a process and not waiting for it to finish like here. Don't wait for the process to exit

Community
  • 1
  • 1
stampede76
  • 1,521
  • 2
  • 20
  • 36

2 Answers2

0

Put set_time_limit(0) on top of the request page. 0 is meant for max possible time.

Taco
  • 317
  • 3
  • 18
  • Yes I did that with no luck. The problem from the logs is the client stops the connection to the server due to system http connection timeout. I was wondering if there's a server side setting which will override this. – stampede76 Mar 15 '12 at 15:48
  • Is server is in your hand or is it a remote server? if it is in your hand, try to increase the max connection time in your web server. – Taco Mar 16 '12 at 10:15
  • It seems to be an issue with the php code. It uses header to send a 302 status and a new location. Its opencart using the built in redirect. I will keep debugging and keep this updated. – stampede76 Mar 16 '12 at 16:08
0

Outputting data to the browser periodically fixed this. Apache was loading a request for about 10 minutes without output causing the browser to close the connection on the client side. I just sent periodic status updates using echo and it worked.

stampede76
  • 1,521
  • 2
  • 20
  • 36