beginSignedUploadSession() causes error when loaded to PHP AppEngine Flex

40 views
Skip to first unread message

Brijid | Ben Tredinnick

unread,
Jun 13, 2019, 9:10:48 AM6/13/19
to Google App Engine
Hi,

I have a local version of some code (below - replaced default appengine bucket name with "my-default-bucket") working with uploading files to Google Cloud Storage directly. The code is based on the code I found here, https://cloud.google.com/appengine/docs/flexible/php/using-cloud-storage . However, when I upload my code live to AppEngine Flex (PHP) I can see debug statements (removed for brevity) only up until the last statement which calls $object->beginSignedUploadSession() to generate the upload URL. 


$storage = new StorageClient($config);
$bucket = $storage->bucket('my-default-bucket.appspot.com');
$object = $bucket->object('csv_data/tmpcsvdata-' . $model->file_hash . '.csv');

$upload_url = $object->beginSignedUploadSession();

As mentioned, this works fine locally (not using the local Google development server) but generates a 500 error when live and I haven't been able to catch the exception message nor can I see anything suggestive in the AppEngine logs. Around the 500 error in the logs I can see SIGTERM and SIGALRM as well as "waiting for nginx, php-fpm to die", unfortunately this doesn't provide much direction for me.

Anyone else experienced this or have any suggestions as to how to resolve?

Thanks in advance,

Ben

Nicolas (Google Cloud Platform Support)

unread,
Jun 13, 2019, 11:50:55 AM6/13/19
to Google App Engine

Hi,

 

These types of questions are better addressed on StackOverflow where you have access to a large community of enthusiasts and experts to share ideas with and get support from. Please make sure to include all relevant details and error messages which would help the community troubleshoot.
Reply all
Reply to author
Forward
0 new messages