phpScheduleIt
May 21, 2013, 05:06:22 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: phpScheduleIt 2.4.2 has been released!
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Hanging on session_start() in init.php  (Read 3448 times)
a-ciar
Newbie
*

Karma: 0
Posts: 6


« on: May 03, 2010, 02:57:38 PM »

I am experiencing a really strange issue that I have not been able to pin down. Sometimes when a user has had scheduleit open for a while and been idle, when they try to view a page, the new page hangs and never loads. I have tracked the "hangup" to session_start() in init.php. The session file is on the machine and matches the sessionID shown in the cookie by the browser. I am wondering if it has anything to do with the bug report listed here:

http://bugs.php.net/bug.php?id=28856&edit=1

Regardless, I cannot figure out how to fix it. And it is strange that the issue seems to be relatively new. The main problem is it that it is VERY hard to replicate and thus very hard to debug. Any direction here would be greatly appreciated.
Logged
a-ciar
Newbie
*

Karma: 0
Posts: 6


« Reply #1 on: May 03, 2010, 03:04:39 PM »

Sorry I should also add that I am using a custom session name SCHEDSESSID. Clearing this cookie seems to help. Also restarting apache fixes the problem (without having to clear the cookie).
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #2 on: May 11, 2010, 01:48:19 PM »

Do you get any sort of errors in your apache logs?
Logged
a-ciar
Newbie
*

Karma: 0
Posts: 6


« Reply #3 on: May 11, 2010, 02:02:51 PM »

Nope. Nothing in the Apache logs which is what is making this extremely difficult and frustrating to resolve.
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #4 on: May 11, 2010, 03:12:25 PM »

Does it make any difference if you don't use a custom session key?
Logged
a-ciar
Newbie
*

Karma: 0
Posts: 6


« Reply #5 on: May 11, 2010, 03:20:07 PM »

Nope. It started before that. I started using a custom one because I thought there may have been an issue with the regular PHPSESSID since we have other PHP apps running on the same server. The issue has not been seen in these apps but they are not used with anywhere near the frequency of the scheduler. We are beginning to think it is some Apache issue since we setup a testing server it seems to be running okay. The problem is they are both at the same Apache and PHP version. PHP is at 5.1.6 and Apache is 2.2.3. Both servers running on RHEL5.

Other interesting notes of our configuration:

we are using LDAP auth.
these are virtual machines and they access disk images over a SAN.

I don't think these are related to the problem though since the testing server seems to be running okay.

I feel like I am chasing my tail going back and forth between phpSechduleIt, PHP, and Apache as the culprits. The only thing I know for certain is that it is hanging on the call to session_start()

Thanks
Logged
a-ciar
Newbie
*

Karma: 0
Posts: 6


« Reply #6 on: May 19, 2010, 01:34:48 PM »

Well I think I have found the issue. It actually was not related to session_start(). Somehow Xdebug led me astray in that regard. I am now pretty sure it has to do with persistent connections that phpScheduleIt uses. Our db server only allowed 100 max connections, Apache was spawning new child processes which means new DB connections, so once we hit our 100 connection cap (because the default cnx timeout in MySQL is 8 hours!) we started getting hang ups.

Is there is any reason not to change the $persistent flag to 'false' when DB::connect() is called in DBConnection.class.php? Will this break anything I am unaware of? And could/should this be made a configuration option in future versions?
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #7 on: May 24, 2010, 02:12:56 PM »

You will not cause any problems by changing it.  This will be a config option in the future.  Thanks for letting me know about this.
Logged
yeahmag
Newbie
*

Karma: 0
Posts: 8


« Reply #8 on: June 06, 2011, 06:56:14 PM »

Sorry to dredge up this old post, but I'm having a very similar problem with a very similar setup. Did this correct the "hang" for you?
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!