GAE PHP deploy failing

72 views
Skip to first unread message

Brad Kilshaw

unread,
Nov 5, 2018, 8:38:54 AM11/5/18
to Google App Engine
Hi all,

I'm using GAE for a Laravel PHP site and using flex instances. I've always had no problem doing a "gcloud app deploy" to get my app deployed. However, for the last 24 hours or so when I attempt to deploy I get the following error:

Step #1: Package manifest generated successfully.
Step #1: > chmod -R 755 bootstrap/cache
Step #1: > php artisan cache:clear
Step #1: 
Step #1: In AbstractConnection.php line 155:
Step #1:                                               
Step #1:   Connection timed out [tcp://1.2.3.4:6379]  
Step #1:                                               
Step #1: 
Step #1: Script php artisan cache:clear handling the post-install-cmd event returned with error code 1
Step #1: The command '/bin/sh -c /build-scripts/composer.sh' returned a non-zero code: 1
Finished Step #1
ERROR
ERROR: build step 1 "gcr.io/cloud-builders/docker@sha256:12345" failed: exit status 1
Step #1: 
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

ERROR: (gcloud.app.deploy) Cloud build failed. Check logs at https://console.cloud.google.com/gcr/builds/12345?project=1234 Failure status: UNKNOWN: Error Response: [2] Build failed; check build logs for details


I have a Memorystore (redis) instance I use since GAE memcache isn't available on flex instances yet. My app uses redis as a cache, so as you can see above, once the new code is deployed composer is configured to clear the cache, which is where it's timing out and failing.

If I SSH into an existing instance, I can run `php artisan cache:clear` no problem. However, it's failing on deploy. It's a pretty simple code change that's only UI tweaks (html/javascript) so none of the redis or connection code has changed.

Any ideas?

George (Cloud Platform Support)

unread,
Nov 5, 2018, 3:53:11 PM11/5/18
to Google App Engine
Hello Brad, 

Have you tried deploying our old app, prior to the simple code change that is only an UI tweak? Does it deploy without error? 

There are no issues with the service on the Google Cloud Platform, service is offered at usual parameters, so you should't be affected by any out-of-common situation. 

This discussion group is oriented more towards general opinions, trends, and issues of general nature touching the app engine. For coding and programming architecture, as well as setting up Redis, you may be better served in dedicated forums such as stackoverflow, where experienced programmers are within reach and ready to help. 

Brad Kilshaw

unread,
Nov 6, 2018, 2:42:12 PM11/6/18
to Google App Engine
Hi George,

Yes, I have tried deploying the exact same commit that deployed fine previously, and it no longer works. At that point, my environment hasn't changed and the code hasn't changed and yet the deployment is still failing.

George (Cloud Platform Support)

unread,
Nov 6, 2018, 2:56:34 PM11/6/18
to Google App Engine
Hi Brad, 

Instead of CLI script, does calling this command from your code succeed? What happens if you use something in the line of: 

Route::get('/clear-cache', function() {
    $exitCode = Artisan::call('cache:clear');
});

As mentioned, you are better off asking for coding advice in forums such as stackoverflow. 


Reply all
Reply to author
Forward
0 new messages