Jump to content

Recommended Posts

Hi All,

 

I have a php script which runs in a loop get 440 soap request to fetch some data feed.

 

I need to run this script using cron. The problem I am facing here is: if I use wget, after some point of time let us say, after 300 requests, the script starts again and run from the start.

 

The same php code, If I run in browswer, it completes one full loop of 440 and the script exits.

 

As for my understanding there is no memory problem, I have 4gb or ram and ini set memory limit of 1GB in the code. I am sure I unset all the variable in the loop.

 

For the past 48 hours I am totally distorted.

 

Any help would be highly appreciated.

Link to comment
https://forums.phpfreaks.com/topic/240074-php-script-in-wget-vs-browser-issue/
Share on other sites

The issue RESOLVED.

 

That is because of the default Wget timeout. By default it is set to 900seconds. I tested with more than 900 sec and it worked.

Because the script takes more than 900 seconds to complete, that is the reason why it restarts again.

 

I tested with --timeout=1800 it worked. To disable this, use --timeout=0.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.