mhoofman / wordpress-heroku

Template project for deploying WordPress to Heroku
Other
1.3k stars 704 forks source link

Installing JetPack #18

Open mps opened 12 years ago

mps commented 12 years ago

Jetpack requires an authentication moment with Wordpress.com but that does not work for some reason when hosted on Heroku. Any ideas on how to get this plugin working with this setup?

Thanks

leods92 commented 11 years ago

I'm having the same problem. I guess we would need to change php.ini's timeout value but that is not possible with Heroku or is it? :/

ryw commented 11 years ago

Anyone get this to work? Just tried to install CoreControl plugin based on this post and was able to get a different error, but still no dice :(

pepito2k commented 11 years ago

I'm running into the same issue, it seems to be heroku blocking server-to-server connections.

joelcuevas commented 11 years ago

Same here. CoreControl didn't help.

raywu commented 11 years ago

I'm getting a site_inaccessible error and I'm new to Wordpress.org after I tried Core-Control

Error Details: The Jetpack server was unable to communicate with your site [IXR -32300: transport error: http_request_failed Operation timed out after 15132 milliseconds with 0 out of -1 bytes received]

The xmlrpc.php is at the root directory. I tried to modify the .htaccess according to this post but it crashed the host: http://wordpress.org/support/topic/plugin-jetpack-site_inaccessible-1

Anyone has a fix for this? I read that the key is to allow Heroku to free up xmlrpc.php with SecFilterRemove disabled in .htaccess.

xyu commented 11 years ago

I don't think this is possible using the free tier from Heroku. On my instance I'm seeing the following logs:

2013-06-03T13:15:21.391493+00:00 heroku[router]: at=info method=HEAD path=/wp-admin/admin.php?page=jetpack&action=register&_wpnonce=XXXXXXXXXX host=www.xyu.io fwd="24.61.130.200" dyno=web.1 connect=1ms service=16488ms status=200 bytes=0
2013-06-03T13:15:21.511473+00:00 heroku[router]: at=info method=POST path=/xmlrpc.php?for=jetpack host=www.xyu.io fwd="72.232.7.14" dyno=web.1 connect=13ms service=15066ms status=200 bytes=207
2013-06-03T13:15:21.810721+00:00 app[web.1]: 10.68.182.136 - - [03/Jun/2013:13:15:04 +0000] "HEAD /wp-admin/admin.php?page=jetpack&action=register&_wpnonce=XXXXXXXXXX HTTP/1.1" 200 -
2013-06-03T13:15:21.810721+00:00 app[web.1]: 10.241.82.47 - - [03/Jun/2013:13:15:21 +0000] "POST /xmlrpc.php?for=jetpack HTTP/1.1" 200 207

Which seems to indicate the register call is hitting the web dyno which keeps the connection open and requests that jetpack servers hit the XML-RPC endpoint, which it does. However because there's only one dyno the XML-RPC is queued behind the initial register call and thus never completes / times out.

It does not seem to be possible to enable jetpack without at least 2 web dynos running.

xyu commented 11 years ago

So the problem was the concurrent connections issue and Core-Control was not actually needed. Above is a pull request to add the Jetpack plugin and reconfigure the web dyno to accept up to 8 concurrent connections. This fixes the issues with connecting Jetpack and also makes the site more performant to boot.