PDA

View Full Version : CGI Timeout when pruning threads in a forum


Tungsten
Sun 22nd Jun '03, 3:38pm
I am receiving this error on my vB 3.0.0 Beta 3 test server when pruning all threads in a forum. Forum has 58 threads and 952 posts.Deleting Threads. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . HTTP/1.1 502 Gateway Error Server: Microsoft-IIS/5.0 Date: Sun, 22 Jun 2003 18:38:32 GMT Connection: close Content-Length: 186 Content-Type: text/html CGI Timeout

The specified CGI application exceeded the allowed time for processing. The server has deleted the process.

Any thoughts? Server specs are identical to those in my signature. Hardware is a PII-450Mhz machine with 512MB memory. Just a simple test box. Production server is much more robust than that.

Tungsten
Mon 23rd Jun '03, 10:10am
Bump. No answer for this?

Steve Machol
Mon 23rd Jun '03, 1:57pm
Nope, sorry. Is PHP running as a CGI module on your server?

Tungsten
Mon 23rd Jun '03, 3:59pm
Nope, sorry. Is PHP running as a CGI module on your server?
No, not running as a CGI module.

Tungsten
Mon 23rd Jun '03, 4:11pm
By way of an update, I just tried pruning that forum again. It timed out on me but I noticed that CPU utilization remained extremely low during the supposed execution of the pruning routine. Low as in it stayed at 1% the entire time. That's what a CPU shows when it is practically idling on a Win2000 server.

Weird, huh?

Steve Machol
Mon 23rd Jun '03, 4:17pm
What I don't understand is the 'CGI' error. The only time you should see CGI errors is if PHP is running as CGI.

You or your host may need to increase the 'max_execution_time' variable in php.ini. You'll need to restart the web server after making this change.

Tungsten
Mon 23rd Jun '03, 4:21pm
I'll check my PHP.ini and modify it accordingly. IIS actually has a configuration value for maximum execute time which is set to 300 seconds by default. I bumped it up to 900 seconds just to see what would happen.

Basically, it took 15 minutes for the server to kick back that error again. :D

It really looks as if the pruning routine is never kicking off when you consider the low % of CPU activity during that time. It should almost be an instantaneous pruning operation given the small # of threads and posts.

Tungsten
Mon 23rd Jun '03, 4:25pm
And just to muddy the water even more...

I tried to selectively prune just a few threads (three with a total of 34 posts between them) and it still went into a timeout.

Seems like the pruning operation just isn't executing or is going into an endless loop. I'd suspect the former as a loop should show up as a hit in CPU performance.

Tungsten
Mon 23rd Jun '03, 4:43pm
Okay... let's have this post supercede my previous posts. :D


I checked and PHP was running as a CGI application (php.exe) rather than as an ISAPI application (php4isapi.dll) so I changed that. The forums are now running with PHP as an ISAPI application.

Now I am getting the following error when I try to prune posts out of that particular forum:
Deleting ThreadsPHP has encountered a Stack overflow
HOWEVER... I was able to prune a few short threads out of another forum without any problem. ???

Then I went on to prune a bunch of threads out of our very active "Lounge" forum and got the following error...


Deleting Threads. . . . . . . . . . PHP has encountered a Stack overflow


Strange stuff.

Steve Machol
Mon 23rd Jun '03, 4:45pm
Is that the complete error message?

Tungsten
Mon 23rd Jun '03, 4:45pm
Yes indeed. I can set you up with admin access to this installation of vb3 if that would help you. :)

Tungsten
Mon 23rd Jun '03, 4:50pm
WOW... new development! It appears that there is one thread that is causing the problem. If I deselect that thread while doing a selective prune, the pruning operation works.

What can I do to export this thread for you guys to take a look at?

Steve Machol
Mon 23rd Jun '03, 5:04pm
I wouldn't know what to look for. Post the URL to this thread and one of the Devs can have a look.

Tungsten
Mon 23rd Jun '03, 5:18pm
I wouldn't know what to look for. Post the URL to this thread and one of the Devs can have a look. Okay... the direct link to this thread is as follows:

http://test.tennesspeed.net/forums/showthread.php?threadid=1540

However the developer(s) investigating this will need to PM me for a username and password to sign on. I have the forums locked down since it's my test server. There is an account set up and waiting for this purpose.



----[edit]----

I had wondered if it was something to do with threads being locked that cause the overflow. Apparently not as I tested this on some more threads and that had nothing to do with it.

Wondering now if it has something to do with a thread containing a post by a user who has since been deleted.

Tungsten
Mon 23rd Jun '03, 5:50pm
Okay now this is even more strange:

Once I isolate which threads in a forum are preventing the pruning function from working properly, I can try to delete the thread in question and vBulletin sort of freaks out on me.

Hard to explain what is happening so here are some screen shots.

First screenie is the thread that I am about to delete. Second screenie is what I see after I click to delete the thread... a blank browser screen. Third screen is what I see if I hit the browser refresh right after the blank screen.

If I go back to the forum index and drill down to the subform, the "deleted" thread is still there. :confused:

It has nothing to do with posts from a deleted user being in the thread as there are none!

TommyBALL
Mon 23rd Jun '03, 7:12pm
I'm getting both timeouts and stack overflows when doing rebuilding of search index. And it is spesific posts that generate the errors. Skipping those posts will ofcourse circumvent the problem.

My platform details is in my .sig

I'll post more details when I have time.

Tungsten
Wed 25th Jun '03, 8:07pm
Hey guys... can we please get this moved to the Bugs forum so that the developers will at least look at it?


I am getting PHP stack overflows when trying to delete subforums that contain what I am now calling "contaminated" posts. I'm not sure what it is that makes these posts so caustic to the process of pruning threads and/or deleting an entire forum, but whatever it is - it throws a huge wrench in the works.

I can duplicate the problem at will. Previously I was told that a developer would get in contact with me; well... I am still waiting!

Freddie Bingham
Wed 25th Jun '03, 8:19pm
Thread moved with redirect to 'vBulletin 3 Bugs' by Ed Sullivan on 06-23-2003 at 12:16 PM.

We are getting to each bug as time permits.

Tungsten
Wed 25th Jun '03, 9:28pm
Thread moved with redirect to 'vBulletin 3 Bugs' by Ed Sullivan on 06-23-2003 at 12:16 PM.

We are getting to each bug as time permits.

Thank you. :)

Mike Sullivan
Thu 26th Jun '03, 5:08pm
Try making the fix I posted here: http://www.vbulletin.com/forum/showthread.php?t=74804 . Does it still stop on that thread? If yes, please PM me with access details so I can take a look at that thread.

Tungsten
Thu 26th Jun '03, 5:26pm
Try making the fix I posted here: http://www.vbulletin.com/forum/showthread.php?t=74804 . Does it still stop on that thread? If yes, please PM me with access details so I can take a look at that thread.

Yes, it still stops... I get this on screen:

Building Search IndexPosts Queried
Processing: 2... Querying first post of thread...Done
Processing: 4... Done
Processing: 5... Done
Processing: 7... Done
Processing: 8... Done
Processing: 9... Querying first post of thread...Done
Processing: 10... Querying first post of thread...PHP has encountered a Stack overflow

Will send you a PM with access details.

Tungsten
Fri 27th Jun '03, 12:29am
Try making the fix I posted here: http://www.vbulletin.com/forum/showthread.php?t=74804 . Does it still stop on that thread? If yes, please PM me with access details so I can take a look at that thread.
Many thanks to Ed Sullivan for helping out with this. It seems that I had edited the functions.php file but then re-uploaded the original copy of functions.php rather than the edited version.

DOH!!!

Ed worked on this at my server (via remote) for a few hours this evening and spotted the problem. I've commensed slapping myself around for being such a moron.

Thanks, Ed. Sorry for the hassle. Looks like the case is closed!