wordpress on google app engine

123 views
Skip to first unread message

Jean-Baptiste GRAINDORGE

unread,
Nov 7, 2015, 1:38:24 PM11/7/15
to Google App Engine

Hello,

Im trying to migrate my wife website , actually in production on compute engine, url : www.decocrush.fr
A page should take around 1 or 2 seconds to load (from EU broadband)

I would like to put it on google app engine... Have been testing since days now... Last problem is with latency.
It looks like the website is really faster on the compute engine (have been testing with pingdom, chrome debug tool) than on the app engine.
You can check the test version (on app engine) at the url foodcrush.fr
It's 6s slower on app engine to load a page.
I've this kind of reports about RPC on my console
NomRPCDurée totale (ms)
/2015/10/20/visite-deco-un-chateau-breton-tres-moderne/16481
/images.GetUrlBase711564
/urlfetch.Fetch17463
/blobstore.CreateEncodedGoogleStorageKey7130
/memcache.Get1313

Looks like images.GetUrlBase is taking forever, i can't explain why... I tried a D1 plan instead of the D0, no luck. Same thing with the "instance always on"
Thanks for your help

Adam

unread,
Nov 11, 2015, 4:41:41 PM11/11/15
to Google App Engine
The Images API is using Google Cloud Storage via Blobstore, not Google Cloud SQL, so changing your Cloud SQL instance class is not going to have any effect on RPC latency for images.GetUrlBase in any case.

Calls to images.GetUrlBase can be slow (as a history of Google search results will attest to), but there may be some things you can do to work around this such as using async versions of Google API calls. I'd need to see more about what's happening inside your handler to make further suggestions, but then the question may be more suitable for posting to StackOverflow.

Jean-Baptiste GRAINDORGE

unread,
Nov 15, 2015, 12:26:32 PM11/15/15
to Google App Engine
Hello Adam,

Thank you for your answer, the website is now in production on google app engine (at the url www.decocrush.fr )
Everything is working fine and it looks like it was a bug due to the wordpress theme. I set caching up and it's ok now :)
I still have a little problem...
I made a bucket ( cdn.decocrush.fr ) on wich I stock images, I made some "sed" on the raw sql before importing et voila ! that's working
BUT old images urls are not working anymore, I guess I've a problem with handlers or rewrite rules

What I'm trying to achieve is something like this :

Typically I'd like that if a client requests "just" an image at the url

www.decocrush.fr/wp-content/uploads/2014/10/my-image.png

he get the image from

cdn.decocrush.fr/uploads/2014/10/my-image.png

(for now he get a 404 :( )

I put this in my .htaccess but it doesn't work

Redirect 301 /wp-content/uploads/ http://cdn.decocrush.fr/uploads/

handlers are the one by default like :


handlers:

- url: /(.*\.(htm|html|css|js))$
  static_files: wordpress/
\1
  upload
: wordpress/.*\.(htm|html|css|js)$
  application_readable
: true

- url: /wp-content/(.*\.(ico|jpg|jpeg|png|gif|woff|ttf|otf|eot|svg|pdf))$
  static_files
: wordpress/wp-content/\1
  upload
: wordpress/wp-content/.*\.(ico|jpg|jpeg|png|gif|woff|ttf|otf|eot|svg)$
  application_readable
: true

- url: /(.*\.(ico|jpg|jpeg|png|gif|woff|ttf|otf|eot|svg))$
  static_files: wordpress/
\1
  upload
: wordpress/.*\.(ico|jpg|jpeg|png|gif|woff|ttf|otf|eot|svg)$
  application_readable
: true

- url: /wp-includes/images/media/(.*\.(ico|jpg|jpeg|png|gif|woff|ttf|otf|eot|svg))$
  static_files
: wordpress/wp-includes/images/media/\1
  upload
: wordpress/wp-includes/images/media/.*\.(ico|jpg|jpeg|png|gif|woff|ttf|otf|eot|svg)
  application_readable
: true


I'm not really understanding how handlers are working and if I can achieve this with them.


Thanks for your help

Reply all
Reply to author
Forward
0 new messages