4

I've had this issue for a while now and have never been able to get it solved - even after chatting in Slack about it with some people. Basically whenever I go to update an entry, Craft hangs and locks up Apache. It times out in about 5 minutes or if I manually restart Apache, things go back to normal. The entry is updated after the server restarts so it appears that the database write is successful.

It's becoming a huge problem as I'm finishing up a site for a client and they're needing to put content in. I'm running this on a Google VM and have tried installing it on a fresh server with no luck. I'm running Ubuntu 14.0.3. I'm running other Craft sites on Google and have no issues.

I tried a few steps a while back (I can't remember what exactly), I believe I increased a couple parameters in PHP.ini but I honestly can't remember. I used to be getting the zend_mm_heap_corrupted error but that's gone away now from my Apache error log.

Any help is appreciated. It's getting sort of urgent at this point since my deadline is approaching and entries need to be worked on.

My Apache version is 2.4.7 if that makes any difference.

13
  • 1
    If you enable devMode and look at the timestamps in the profiling information in craft/storage/runtime/logs are you able to tell where the delay is taking place?
    – Brad Bell
    Commented Aug 31, 2015 at 17:22
  • @BradBell I didn't notice any significant delay. I uploaded the part of my log where I updated the entry to Pastebin. If you wouldn't mind taking a look the link is here: pastebin.com/CwhZXDeD. I'm stumped by this...
    – anguiac7
    Commented Aug 31, 2015 at 22:21
  • I don't see a delay in there at all... are you not able to reproduce anymore?
    – Brad Bell
    Commented Aug 31, 2015 at 23:17
  • @BradBell unfortunately, I'm still seeing the issue. I just attempted to update the entry and am currently watching the site hang. I'll check the logs again after it's recovered to see if anything is in there. The odd thing is that obviously the request goes through and updates the DB because if I restart Apache, the entry has been updated. I can give you access to the server if that would help - it's the only site on there right now.
    – anguiac7
    Commented Sep 1, 2015 at 0:02
  • 1
    Looks like it's happening when Craft/Yii calls PHP's session_start. I'd start by review all of the PHP session settings and making sure they are configured properly.
    – Brad Bell
    Commented Sep 1, 2015 at 0:11

1 Answer 1

5

It turns out that I was running a dev release of PHP 5.6 from a PPA and not the official Ubuntu release. With Brad Bell's help (thank you so much!) I got on the right track to looking into PHP and realized that that was the problem. After purging the PPA and reverting to PHP 5.5.9 on the official Ubuntu repo, the problem seems to have gone away. Hopefully never to return again.

Thanks again, Brad!

EDIT: As I said below, the problem appeared again. It seems to have been solved when I disabled Craft's devMode in my environment variables. I'm not sure what would cause that to be an issue, but devMode is something I can live without for now since the site is near going live. Brad, if you have any insight as to why devMode would be causing the issues, I'd love to hear it :)

Thanks!

9
  • 1
    Glad you got it sorted!
    – Brad Bell
    Commented Sep 1, 2015 at 2:26
  • @BradBell Unfortunately it looks like it's reared its ugly head again... I'm seeing that 5 minute delay when it goes to start the httpsession in the logs. Crap. I was so excited it was fixed. Any ideas?
    – anguiac7
    Commented Sep 1, 2015 at 7:02
  • Do you happen to have gzip output compression enabled either at the PHP or Apache level on this box?
    – Brad Bell
    Commented Sep 1, 2015 at 17:15
  • @BradBell thanks for bearing with me through this! Yes, gzip is enabled on the box. Should I try disabling it?
    – anguiac7
    Commented Sep 2, 2015 at 1:37
  • 1
    @BradBell oddly enough, it seems to be devMode causing the issues. Once I disabled it, I was able to save again without problems (for now). Odd.
    – anguiac7
    Commented Sep 2, 2015 at 4:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.