<p>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.</p>

<p>Thanks again, Brad!</p>

<p><strong>EDIT:</strong> 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 :)</p>

<p>Thanks!</p>

CC BY-SA 3.0
2015-09-01T02:26:04.817Z
Glad you got it sorted!
Brad Bell
CC BY-SA 3.0
2015-09-01T07:02:00.840Z
@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
CC BY-SA 3.0
2015-09-01T17:15:08.723Z
Do you happen to have gzip output compression enabled either at the PHP or Apache level on this box?
Brad Bell
CC BY-SA 3.0
2015-09-02T01:37:40.777Z
@BradBell thanks for bearing with me through this! Yes, gzip is enabled on the box. Should I try disabling it?
anguiac7
CC BY-SA 3.0
2015-09-02T03:42:34.587Z
Yeah, try disabling it and see if the issue resolves itself.  If it does, then I have a suggestion to try with it enabled that might work as well.
Brad Bell
CC BY-SA 3.0
2015-09-02T04:06:16.293Z
@BradBell I disabled gzip via a2dismod deflate and still have the issue :(
anguiac7
CC BY-SA 3.0
2015-09-02T04:12:43.897Z
@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
CC BY-SA 3.0
2017-07-19T14:43:56.387Z
@anguiac7 I'm finding this currently. Disabling devMode speeds things along. It might be because I'm running on a lower-specced dev server but it's normally okay.
Clive Portman
CC BY-SA 3.0
2017-11-15T09:45:21.113Z
I'm seeing the same results when disabling devMode, it seems to come back to life immediately. Since it's a production server it's no issue to turn it off, but it's certainly curious.
Mike Pierce
CC BY-SA 3.0
2015-09-01T01:41:58.283Z
2015-09-02T04:12:02.047Z
2015-09-02T04:12:02.047Z
anguiac7
<p>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.</p>

<p>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.</p>

<p>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.</p>

<p>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.</p>

<p>My Apache version is 2.4.7 if that makes any difference.</p>

CC BY-SA 3.0
2015-08-31T17:22:27.583Z
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
CC BY-SA 3.0
2015-08-31T22:21:58.707Z
@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: http://pastebin.com/CwhZXDeD. I'm stumped by this...
anguiac7
CC BY-SA 3.0
2015-08-31T23:17:29.670Z
I don't see a delay in there at all... are you not able to reproduce anymore?
Brad Bell
CC BY-SA 3.0
2015-09-01T00:02:07.210Z
@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
CC BY-SA 3.0
2015-09-01T00:09:31.647Z
Post another link to the logs once it recovers.
Brad Bell
CC BY-SA 3.0
2015-09-01T00:09:33.213Z
@BradBell I've found a delay in the logs after waiting for it to go through: http://pastebin.com/EC9n17Rj
anguiac7
CC BY-SA 3.0
2015-09-01T00:11:11.560Z
Looks like it's happening when Craft/Yii calls PHP's [session_start](https://secure.php.net/manual/en/function.session-start.php).  I'd start by review all of the PHP session settings and making sure they are configured properly.
Brad Bell
CC BY-SA 3.0
2015-09-01T00:14:41.370Z
@BradBell ok, I'll look at those. Looking at that log again, I think it may be the wrong one. Sorry! Here is the complete log from after I edited the entry - I guess my FTP didn't refresh when I sent you the other one. http://pastebin.com/m91aSg11
anguiac7
CC BY-SA 3.0
2015-09-01T00:16:19.843Z
Same thing... there's a 5 min delay when calling session_start.
Brad Bell
CC BY-SA 3.0
2015-09-01T00:21:41.527Z
@BradBell sorry for being dense, but what do you mean by reviewing the PHP session settings?
anguiac7
CC BY-SA 3.0
2015-09-01T00:37:33.257Z
Basically anything session related under your php.ini file's settings.
Brad Bell
CC BY-SA 3.0
2016-03-23T12:27:46.897Z
I am seeing the same problem, and have done intermittently in the past - but not for months. It's doing it again now though. Seems to me to be PHP or Apache. I can restart Apache and it'll work fine first save, but edit again and it'll sit spinning forever. The 'hung' save does actually work, you can see it reflected by checking the front-end in other browsers. While the spinner is happening, you can't browse any of the website, backend or front, from the browser you were using to edit. This is only happening on our staging server, not our local though both run the same website and same databa
Matt Wilcox
CC BY-SA 3.0
2016-03-23T17:57:17.327Z
@MattWilcox: I converted your "answer" to a comment, since it didn't really answer the question. Looks like the comment got cut off though, so feel free to [ask a new question](http://craftcms.stackexchange.com/questions/ask) instead.
Lindsey D
<entries><server><apache>
Craft hangs when updating entry
# Craft hangs when updating entry

(Asked by: username_0 on 2015-08-31)

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.

**Tags:** entries, server, apache

> **Comments:**
> **username_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?  
> **username_0**: @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: http://pastebin.com/CwhZXDeD. I'm stumped by this...  
> **username_1**: I don't see a delay in there at all... are you not able to reproduce anymore?  
> **username_0**: @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.  
> **username_1**: Post another link to the logs once it recovers.  
> **username_0**: @BradBell I've found a delay in the logs after waiting for it to go through: http://pastebin.com/EC9n17Rj  
> **username_1**: Looks like it's happening when Craft/Yii calls PHP's [session_start](https://secure.php.net/manual/en/function.session-start.php).  I'd start by review all of the PHP session settings and making sure they are configured properly.  
> **username_0**: @BradBell ok, I'll look at those. Looking at that log again, I think it may be the wrong one. Sorry! Here is the complete log from after I edited the entry - I guess my FTP didn't refresh when I sent you the other one. http://pastebin.com/m91aSg11  
> **username_1**: Same thing... there's a 5 min delay when calling session_start.  
> **username_0**: @BradBell sorry for being dense, but what do you mean by reviewing the PHP session settings?  
> **username_1**: Basically anything session related under your php.ini file's settings.  
> **username_2**: I am seeing the same problem, and have done intermittently in the past - but not for months. It's doing it again now though. Seems to me to be PHP or Apache. I can restart Apache and it'll work fine first save, but edit again and it'll sit spinning forever. The 'hung' save does actually work, you can see it reflected by checking the front-end in other browsers. While the spinner is happening, you can't browse any of the website, backend or front, from the browser you were using to edit. This is only happening on our staging server, not our local though both run the same website and same databa  
> **username_3**: @MattWilcox: I converted your "answer" to a comment, since it didn't really answer the question. Looks like the comment got cut off though, so feel free to [ask a new question](http://craftcms.stackexchange.com/questions/ask) instead.  

---

## 1 answers

### Answer by username_0 on 2015-09-01. Score: 5 | Accepted answer

It turns out that I was running a dev release of PHP 5.6 from a PPA and not the official Ubuntu release. With username_1'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!

> **Comments:**
> **username_1**: Glad you got it sorted!  
> **username_0**: @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?  
> **username_1**: Do you happen to have gzip output compression enabled either at the PHP or Apache level on this box?  
> **username_0**: @BradBell thanks for bearing with me through this! Yes, gzip is enabled on the box. Should I try disabling it?  
> **username_1**: Yeah, try disabling it and see if the issue resolves itself.  If it does, then I have a suggestion to try with it enabled that might work as well.  
> **username_0**: @BradBell I disabled gzip via a2dismod deflate and still have the issue :(  
> **username_0**: @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.  
> **username_4**: @username_0 I'm finding this currently. Disabling devMode speeds things along. It might be because I'm running on a lower-specced dev server but it's normally okay.  
> **username_5**: I'm seeing the same results when disabling devMode, it seems to come back to life immediately. Since it's a production server it's no issue to turn it off, but it's certainly curious.  

---

