[google-appengine] Re: PHP Fatal error: Uncaught Error: Unsupported operand types in /builder/src/Builder/GenFilesCommand.php:279

2021-06-10 Thread 'Angel (Google Cloud Platform Support)' via Google App Engine
Hello,

I ran your app.yaml file but I was unable to reproduce your issue. I was, 
however, able to deploy Laravel in App Engine Flex with PHP following this 
guide [1].

Please try following these steps.

Kind regards,
Angel

[1] 
- https://cloud.google.com/community/tutorials/run-laravel-on-appengine-flexible

On Wednesday, June 9, 2021 at 12:44:25 PM UTC+2 bha...@gmail.com wrote:

>
> Hello,
> Today, while trying to deploy my Laravel PHP app on Google Cloud Build 
> using App Engine Flex, I faced some errors:
>
> This is the app.yaml file:
>
> ```
> runtime: php
> env: flex
>
> runtime_config:
> document_root: public
> whitelist_functions: proc_open
> automatic_scaling:
> min_num_instances: 1
> max_num_instances: 1
> resources:
> cpu: 1
> memory_gb: 0.5
> disk_size_gb: 10
>
> env_variables:
> # See substitution variables for Google Cloud Build Trigger 'qa'
> ```
>
> Step #1: Status: Downloaded newer image for 
> gcr.io/gcp-runtimes/php/gen-dockerfile@sha256:1f43a583e4c10b1758647be47b9fb5f9659227ef266978694acbb7981e4ee093
> Step #1: 
> gcr.io/gcp-runtimes/php/gen-dockerfile@sha256:1f43a583e4c10b1758647be47b9fb5f9659227ef266978694acbb7981e4ee093
> Step #1: + php /builder/create_dockerfile.php create --php73-image 
> gcr.io/google-appengine/php73@sha256:bee53597a0df4167547fd9c2a501484e8c5d03831298f50c1db0e9cdcd915a88
>  
> --php72-image 
> gcr.io/google-appengine/php72@sha256:c3f3636b89aab3a83ab288a0108f767a4d56002c9a214b17b5fe93b9ba5f8bbf
>  
> --php71-image 
> gcr.io/google-appengine/php71@sha256:9d39f66c4e0b7c9a9590ed27373b8c18e79a6cde3dbf48c284ffc5f3fd99d12a
> Step #1: 
> Step #1: Warning: array_key_exists() expects parameter 2 to be array, null 
> given in /builder/src/Builder/GenFilesCommand.php on line 232
> Step #1: 
> Step #1: Warning: array_key_exists() expects parameter 2 to be array, null 
> given in /builder/src/Builder/GenFilesCommand.php on line 232
> Step #1: [09-Jun-2021 10:17:41 UTC] PHP Warning: array_key_exists() 
> expects parameter 2 to be array, null given in 
> /builder/src/Builder/GenFilesCommand.php on line 232
> Step #1: [09-Jun-2021 10:17:41 UTC] PHP Warning: array_key_exists() 
> expects parameter 2 to be array, null given in 
> /builder/src/Builder/GenFilesCommand.php on line 232
> Step #1: [09-Jun-2021 10:17:41 UTC] PHP Warning: array_key_exists() 
> expects parameter 2 to be array, null given in 
> /builder/src/Builder/GenFilesCommand.php on line 174
> Step #1: [09-Jun-2021 10:17:41 UTC] PHP Fatal error: Uncaught Error: 
> Unsupported operand types in /builder/src/Builder/GenFilesCommand.php:279
> Step #1: Stack trace:
> Step #1: #0 /builder/src/Builder/GenFilesCommand.php(163): 
> Google\Cloud\Runtimes\Builder\GenFilesCommand->createDockerfile('
> gcr.io/google-a...')
> Step #1: #1 /builder/vendor/symfony/console/Command/Command.php(255): 
> Google\Cloud\Runtimes\Builder\GenFilesCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput),
>  
> Object(Symfony\Component\Console\Output\ConsoleOutput))
> Step #1: #2 /builder/vendor/symfony/console/Application.php(987): 
> Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput),
>  
> Object(Symfony\Component\Console\Output\ConsoleOutput))
> Step #1: #3 /builder/vendor/symfony/console/Application.php(255): 
> Symfony\Component\Console\Application->doRunCommand(Object(Google\Cloud\Runtimes\Builder\GenFilesCommand),
>  
> Object(Symfony\Component\Console\Input\ArgvInput), 
> Object(Symfony\Component\Console\Output\ConsoleOutput))
> Step #1: #4 /builder/vendor/symfony/console/Application.php(148): 
> Symfony\Component\Conso in /builder/src/Builder/GenFilesCommand.php on line 
> 279
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/5d73ff9a-0c10-4bb2-824b-7707d5111fb7n%40googlegroups.com.


[google-appengine] Re: Google App Engine TCP Connections

2021-06-09 Thread 'Angel (Google Cloud Platform Support)' via Google App Engine
Hello Brad,

I believe this is a similar, if not the same question that has already been 
answered here [1]. Please let me know if this is the case or if I 
misunderstood your question.

Kind regards.
__
[1] 
- https://groups.google.com/g/google-appengine/c/Lj6qaT2lC90/m/TvhGSteRAwAJ

On Tuesday, June 8, 2021 at 9:05:27 AM UTC+2 bradeba...@gmail.com wrote:

> Hi
>
> I have a NodeJS App Engine server which is awaiting a MongoDB query which, 
> when reaching a certain size, never returns. There is no exception thrown 
> from App Engine either. It is as if the process is just killed because 
> execution flow and therefore logging from the process making the MongoDB 
> query stops.
>
> If this were a request to a HTTP server I could look at the limits and 
> quotas page and see that a maximum of 32MB requests and response size is 
> allowed.
>
> I am unable to find any limits or quotas for TCP connections from an App 
> Engine server.
>
> We temporarily solved the issue by using a limit or projection to decrease 
> the amount of data returned by the MongoDB query. When less data is sent 
> back to the App Engine server execution continues and the server runs as 
> expected.
>
> I was wondering if it was possible if at some point if TCP data usage 
> reaches a limit will the App Engine process be killed? Without any logging? 
> Why would the execution of the process handling the response that fires off 
> the MongoDB query stop and no exception or anything further be logged?
>
> Thank you
> Brad

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/7e3c5f5b-cc3b-4460-965f-00a20896feb0n%40googlegroups.com.


[google-appengine] Re: Larger MongoDB Query from App Engine neither succeeding nor failing nor throwing exception

2021-06-08 Thread 'Angel (Google Cloud Platform Support)' via Google App Engine
Hello Brad,

to my knowledge there are no direct data limits in App Engine when used 
over TCP. There are, however, some architectural considerations that are 
worth being aware of for Google Cloud Platform. You can find the related 
article in [1]. It details some use cases in which a final user might 
experience latency issues or network inefficiencies. I believe it might 
give you some insight as to what might be happening in your case.

Kind regards.
__
[1] 
- 
https://cloud.google.com/architecture/tcp-optimization-for-network-performance-in-gcp-and-hybrid

On Tuesday, June 8, 2021 at 9:05:34 AM UTC+2 bradeba...@gmail.com wrote:

> Hi
>
> This weekend we ran into an issue. A function, using Mongoose (a NodeJS 
> MongoDB library) was making a pretty simple query, which when run locally 
> either by running the query directly or when running the entire Node server 
> directly ran fine.
>
> However, when deployed to Google App Engine we noticed that logging was 
> logged out up until we awaited the query to MongoDB and then never 
> continued. No exception was ever logged as well.
>
> It is as if the Mongo query was taking too long and App Engine just killed 
> the Node process all together.
>
> The server did return a 500 error. I believe it was a 503 specifically.
>
> We ended up realizing by using limit or projection we could decrease the 
> response size of the query and get a result and the execution of the NodeJS 
> application would continue.
>
> Now if Mongo was an HTTP server I would see that there is a 32MB maximum 
> request size and be able to find that there are only so many records I can 
> query at once. However, since this is a TCP connection to the Mongo server 
> I cannot find any quotas or limitations on how much data a TCP connection 
> from an App Engine server can send or receive.
>
> As we know that decreasing the size of the response from MongoDB fixed our 
> issue, I believe it is safe to say the issue is related to the amount of 
> data sent/received or more specifically received over TCP when 
> communicating with an App Engine server.
>
> Does anyone have any details on known limitations of App Engine 
> communicating with other services over TCP?
>
> Thank you so much!
> Brad

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/6d0562a1-a9e7-4baf-ba03-0335ffa9568dn%40googlegroups.com.