mchung / heroku-buildpack-wordpress

Heroku buildpack: Wordpress on Heroku
mchung.github.com/heroku-buildpack-wordpress/
388 stars 333 forks source link

cleardb has issues #18

Closed hubrix closed 10 years ago

hubrix commented 11 years ago

I occasionally experience disconnects "NOTICE: PHP message: WordPress database error MySQL server has gone away for query SELECT........"

Sent in a ticket to ClearDB, the support response from ClearDB was: Thanks for your interest in ClearDB. One of the more common items that come up while working with our clusters is that our routers automatically close idle connections after 90 seconds. Depending on how your connection logic is coded, there may be cases in which your application (which appears to be wordpress) will attempt to re-use a connection that has been closed on our end due to the idle timeout. You may want to see about adding retry logic into your code so that this does not happen.

What do?

hubrix commented 11 years ago

It looks like there is a potential fix for this but it's been shelved until some unspecified future version. Can we apply it to the heroku buildpack?

http://core.trac.wordpress.org/attachment/ticket/5932/check-connection.6.diff

mchung commented 11 years ago

Sure. There'd be some work involved to apply the patch as part of the buildpack experience but it would be worth it if fixes the end-user experience. Are you running this patch on production? Can you verify that it fixes it?

On Mon, Apr 8, 2013 at 2:19 PM, Mark Friedgan notifications@github.comwrote:

It looks like there is a potential fix for this but it's been shelved until some unspecified future version. Can we apply it to the heroku buildpack?

http://core.trac.wordpress.org/attachment/ticket/5932/check-connection.6.diff

— Reply to this email directly or view it on GitHubhttps://github.com/mchung/heroku-buildpack-wordpress/issues/18#issuecomment-16079494 .

hubrix commented 11 years ago

Not yet, wanted to get your thoughts. What's the best way to test this?

Mark Friedgan

On Monday, April 8, 2013 at 10:51 PM, Marc Chung wrote:

Sure. There'd be some work involved to apply the patch as part of the
buildpack experience but it would be worth it if fixes the end-user
experience. Are you running this patch on production? Can you verify that
it fixes it?

  • Marc

On Mon, Apr 8, 2013 at 2:19 PM, Mark Friedgan <notifications@github.com (mailto:notifications@github.com)>wrote:

It looks like there is a potential fix for this but it's been shelved
until some unspecified future version. Can we apply it to the heroku
buildpack?

http://core.trac.wordpress.org/attachment/ticket/5932/check-connection.6.diff


Reply to this email directly or view it on GitHubhttps://github.com/mchung/heroku-buildpack-wordpress/issues/18#issuecomment-16079494
.

— Reply to this email directly or view it on GitHub (https://github.com/mchung/heroku-buildpack-wordpress/issues/18#issuecomment-16092751).

luisherranz commented 11 years ago

You can duplicate your Heroku application, usually named "staging" server, which is an exact duplicate to test things. You would have to copy the database too, and change the domain. You can do it editing the SQL file.

mchung commented 11 years ago

Actually, it just occurred to me that I'm probably the best person to test this as I'll need to update the script to pull down WP, unzip, then apply the patch.

jerrod commented 11 years ago

Wanted to see what anyone else's experience with this was. We just put a site into production that is getting about 2mil page views a day and the database connection issue was killing me so i have applied to patch to test to see if that helps.

mchung commented 10 years ago

All-

It looks like that patch referenced earlier was merged to Wordpress about 7 weeks ago and shipped in Wordpress 3.9. I just bumped the default Wordpress version to 3.9 which hopefully means I can close this issue.