Need to speed up gae php+cloudSQL

38 views
Skip to first unread message

Jukka Hautakorpi

unread,
Jan 13, 2016, 3:31:38 AM1/13/16
to Google App Engine
Hello

I've been developing an php+sql app. app engine ver. 1.9.31

that is working many times very slow.
I am paying to get the second smallest cloud sql instance (more memory) and have set the instance to be running all the time. So it should not be restarting after idle perioid.

I have also set daily limit, but i think that it wont matter because there are no users for the app currenly so it should be free from the app engine part.
"Billing status Enabled (Daily budget: 0,00 $ boosted by 0,50 $) Settings"


For loading the initial php-screen (affter logged in) I need to check the user session and validate it (from sql) then I need to load the data using simple left join that works smooth from mysql, but not from cloud sql.

How can i make it faster? it is crucial that the loading screen is fast! I could copy some of the data to a faster read-only database if it's easy to use but i don't want to change whole app for another sql.

Here are couple logs:

09:58:02.130
200
8,36 KB
3,34 s
/indexm.php
37.219.169.33 - - [12/Jan/2016:23:58:02 -0800] "GET /indexm.php HTTP/1.1" 200 8558 - "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36" "tuunix-tuntileimaus.appspot.com" ms=3337 cpu_ms=21 cpm_usd=0.0009564310000000001 instance=00c61b117c63aaef224186a3798ac27fa23xxx app_engine_release=1.9.31 trace_id=c46a5c43610c5bf97d758acf9d444f85


09:58:31.555
200
367 B
275 ms
/setworktimecomment.php
37.219.169.33 - - [12/Jan/2016:23:58:31 -0800] "POST /setworktimecomment.php HTTP/1.1" 200 367 - "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36" "tuunix-tuntileimaus.appspot.com" ms=275 cpu_ms=20 cpm_usd=4.1015e-05 instance=00c61b117c63aaef224186a3798ac27fa23xxx app_engine_release=1.9.31 trace_id=92b17ea4ba9f003a735fa58f2465ba67

Trace:


What should I do ?

Jukka Hautakorpi

unread,
Jan 13, 2016, 3:40:20 AM1/13/16
to Google App Engine
How stupid of me:
I re-checked the cloudsql instance at it really was to set running on-demand.

I changed it now and will see how it is affecting.

But still like to know that is there a faster sql-like option to read some of the app's data from there ?

Anthony Shapley

unread,
Jan 13, 2016, 3:42:16 AM1/13/16
to Google App Engine
Hey 

Have you set the SQL Cloud instance to follow the app?

Ant

Jukka Hautakorpi

unread,
Jan 13, 2016, 4:50:45 AM1/13/16
to Google App Engine
Yes i have thank you.
i seems now working faster

I just now received a newsletter about the new cloudsql 2 beta, i will post new topic about that.
Reply all
Reply to author
Forward
0 new messages