Web Hosting Talk







View Full Version : PHP Session Trouble


james8365
11-14-2003, 05:59 AM
Our site suddenly started crawling (really slow) and I've isolated the problem to the session_start() call which sometimes takes 30 minutes to return?

Has anyone any ideas why this could be/encountered similar difficulties? The site works fine on other hosts but it needs to work on the server we've paid for :)

PHP is version 4.2.3 running on Apache 1.39 on Linux. PHP was compiled with enable-trans-sid option.

The session configuration is:

session.auto_start: Off Off
session.cache_expire: 180 180
session.cache_limiter: nocache nocache
session.cookie_domain: no value no value
session.cookie_lifetime: 0 0
session.cookie_path: / /
session.cookie_secure: Off Off
session.entropy_file: no value no value
session.entropy_length: 0 0
session.gc_maxlifetime: 1440 1440
session.gc_probability: 1 1
session.name: PHPSESSID PHPSESSID
session.referer_check: no value no value
session.save_handler: files files
session.save_path: /tmp /tmp
session.serialize_handler: php php
session.use_cookies: On On
session.use_trans_sid: 1 1


Any ideas?

Thanks in anticipation.

James

XLHost
11-14-2003, 11:45 AM
Do you have an assload of old sessions in /tmp or whatever PHP is writing your sessions?

-Drew

james8365
11-16-2003, 10:52 AM
Hi, I'm not sure, its a managed server. I had asked them to clean them out but would this make a difference if the session ids (and hence filenames are unique)?

I understand session_start() uses concurrent writing techniques but can't see how this makes a difference if session ID is unique. Its a really wierd problem - have been developing for about 6 years in php and never encountered it before!

Thank you for your suggestion :)

James