Previous Thread
Next Thread
Print Thread
Hop To
#229630 10/01/2009 7:12 PM
Joined: Jun 2006
Posts: 142
G
member
member
G Offline
Joined: Jun 2006
Posts: 142
I'm still running v7.3, which will hopefully not be for long though.

But today my forum started acting up. At first it started timeing out on request intermittently, then it started working again for a while. Not for long though, because then it went down hard.

I've spent the entire evening debugging, which wasn't easy because of other unrelated computer problems. In the end I found the problem to be two functions calls that just made the system freeze up. The script didn't stop running with an error, it just never seemed to respond really.

First:
session_save_path() call in ubbthreads.inc.php

So I removed that and set it in a php_flag setting in the .htaccess file.

Second:
flock() in the lock_and_write() function in ubbthreads.inc.php

Same thing, so I removed the calls to it for now. Seems to be just for cache files, but still doesn't feel like a good solution.

I don't know why it should just stop working without warning, and why it behaved the way it did. Can't find anything strange in the php.ini file either, like disabling those functions.

My hosting provider is doing server upgrades, which might be the reason. But it doesn't really look like they're doing it right now. Have to wait until the morning until I can get an answer from them.

Any thoughts, anyone?


aka Olle Johansson
Joined: Jun 2006
Posts: 142
G
member
member
G Offline
Joined: Jun 2006
Posts: 142
It turns out the host is running NFS so flock() won't work.

Strange thing is, we haven't had any problem since we switched to this host. And they say they've always run it. So what is really going on here?

And it still doesn't explain why session_save_path() isn't working.

Also, would be nice to be able to turn off the flock() functionality without changing the code.


aka Olle Johansson
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Just made a note to add the ability to turn off flock for v8. A bit odd that it just stopped working. Any news from the host on what all they did during their server upgrades?

On the session_save_path bit, just out of curiosity are there a lot of files in there, and is anything being created in there at all?

Joined: Jun 2006
Posts: 142
G
member
member
G Offline
Joined: Jun 2006
Posts: 142
It was over 4000 files or something, can't remember. Seemed a bit excessive.

Deleted all of the session files as best I could without a proper ftp client.

Added a gc_probability (or something) suggestion from here.

Have had a discussion with the hosting provider over twitter and they say they haven't changed anything. So there shouldn't even have been an upgrade. I don't believe it though. But the support answer on email was even less helpful than the twitter discussion. I'm thinking about giving them a call next week and if I get any more information out of that I'll post it here.


aka Olle Johansson
Joined: Jul 2006
Posts: 2,143
Pooh-Bah
Pooh-Bah
Joined: Jul 2006
Posts: 2,143
The whole.. can't obtain a lock on NFS file systems ... thing led to semaphore locking on UBB.classic. frown

Shame that's still the case years later.


This thread for sale. Click here! [Linked Image from navaho.infopop.cc]
Joined: Jul 2006
Posts: 2,143
Pooh-Bah
Pooh-Bah
Joined: Jul 2006
Posts: 2,143
where did my post go?

Olle, what about fcntl instead of flock?

http://us2.php.net/dio_fcntl


This thread for sale. Click here! [Linked Image from navaho.infopop.cc]
Joined: Jun 2006
Posts: 142
G
member
member
G Offline
Joined: Jun 2006
Posts: 142
I'll give it a try and see how it works out. Thanks for the tip.


aka Olle Johansson

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
1 members (Havenofsobriety), 458 guests, and 91 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)