0

Good afternoon, during profiling my app through blackfire I found, my website loading is stucked for approx second-two in session_start(). I founded some results on internet. For example - install php memcache extension and set "memcached.sess_locking=off". I did it and now session_start() stucks shorter time, but still enought (approx 200 - 600 ms).

Can you help me where can be the next problem, or where to look on? Thank yo ufor your help

PHP 7.4, Debian 9.13

Kevin Colbert
  • 41
  • 1
  • 3
  • Your server might be slow, you might be storing a lot in your session, or [the lifetime of your session](https://stackoverflow.com/questions/520237/how-do-i-expire-a-php-session-after-30-minutes) might be too long, causing too many session files. – KIKO Software Jan 09 '22 at 13:44
  • Thank you for your answer. session.gc_maxlifetime = 1440, I'm not storing a lot in sessions. Sometimes nothing (only time - auto), sometimes few (max. 3) variables with simple short data. I have only session from 7th January 2022. :O Don't know, what to do better. – Kevin Colbert Jan 09 '22 at 14:30
  • It wasn't an answer, more a couple of suggestions. We don't know much about your setup, so it is difficult to guess what could cause this behavior. I also don't know how trustworthy blackfire reports are. If it was up to me, I would corroborate your finding by measuring it with either [microtime()](https://www.php.net/manual/en/function.microtime.php) or [getrusage()](https://www.php.net/manual/en/function.getrusage.php), while not using blackfire, just to make sure this isn't a wild goose chase. – KIKO Software Jan 09 '22 at 15:05

0 Answers0