error 204 in Google App Engine that I can't get rid of

949 views
Skip to first unread message

ssmcooki...@gmail.com

unread,
Jul 12, 2015, 6:57:37 AM7/12/15
to google-a...@googlegroups.com
We have an API with Googe App Engine. This is the current configuration:

<version>1</version>
<threadsafe>true</threadsafe>
<module>default</module>
<instance-class>F2</instance-class>
<automatic-scaling>
<min-idle-instances>7</min-idle-instances>
<max-idle-instances>automatic</max-idle-instances>
<min-pending-latency>automatic</min-pending-latency>
<max-pending-latency>automatic</max-pending-latency>

The process does as follows. We have two calls to datastore and a call with urlfetch (to an external API). The problem consist on that from time to time we recieved en error 204 with this trace: 
E 2015-07-10 10:10:40.875 500 0 B 52ms E 10:10:40.875 XXXXX ms=52 cpu_ms=0 exit_code=204 instance=00c61b117cba17c9f7609d74f3d0311e2c21d8 app_engine_release=1.9.23
E 10:10:40.875 A problem was encountered with the process that handled this request, causing it to exit. This is likely to cause a new process to be used for the next request to your application. (Error code 204)

This error does not stop to appear. It appears in a small percentage of requests. Last time we saw it there was 4 errors that were located in the same instance. 

We tried to change the number of resident instance, we changed it from 3 to 7 and it wasn't solved. We changed the machine type from F2 to F4_1G, but the problem is still there. I saw old post that had this problem and said that it was a bug with the previous gae version, but it still appears in the new version 1.9.23

do you have any idea why this is happening???

dd

unread,
Jul 12, 2015, 11:03:19 PM7/12/15
to google-a...@googlegroups.com
Same Issue here.

Satyanarayana Govindachandra

unread,
Jul 13, 2015, 7:29:55 AM7/13/15
to google-a...@googlegroups.com
i just want to see , do you use Page Speed Service from Application Settings.

On Mon, Jul 13, 2015 at 8:33 AM, dd <nou...@gmail.com> wrote:
Same Issue here.

--
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-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/9c267d1a-ef96-4b20-9f26-a71148dd3a06%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Thank you
Satya
Solestruck

Patrice (Cloud Platform Support)

unread,
Jul 13, 2015, 10:39:32 AM7/13/15
to google-a...@googlegroups.com, satyanarayana....@a-cti.com
Hi,

How small is the percentage of requests that return this? Because to a certain extent, restarts are to be expected.

As explained here, your application should be coded defensively to recover gracefully from these. That's why I'm asking for the % of failure, as this will help make sure if this is expected or not.

Cheers

dd

unread,
Jul 13, 2015, 10:31:07 PM7/13/15
to google-a...@googlegroups.com
No, we do not use Page Speed Service.


2015年7月13日月曜日 20時29分55秒 UTC+9 Satyanarayana Govindachandra:

dd

unread,
Jul 13, 2015, 10:51:01 PM7/13/15
to google-a...@googlegroups.com, satyanarayana....@a-cti.com
Hi

According to graph below, 1% - 3% of total requests.



best




2015年7月13日月曜日 23時39分32秒 UTC+9 Patrice (Cloud Platform Support):

dd

unread,
Jul 14, 2015, 1:17:53 AM7/14/15
to google-a...@googlegroups.com, satyanarayana....@a-cti.com
It seems that the 204 error is fixed upon analyzing/fixing the changes made at the time the 204 error was occurring.

The cause was the kind of code as below executed in the application's entry point.

function setEnv($key, $val){
    putenv("$key=$val");
    $_ENV[$key] = $val;
    $_SERVER[$key] = $val;
}
setEnv(CACHE_DRIVER", "memcached");

We are using Lumen Framework.
This was to switch environment for unittest, but the 204 error stopped occurring after deleting this.
So far the 204 error was occurring 10 times every 1 minute, but after deploying this change we are not seeing the error for about 1 hour.

Not sure if this is a GAE/PHP or Lumen Framework specific bug, but reporting just in case it might be helpful for someone.

Cookie Monster

unread,
Jul 14, 2015, 5:42:21 AM7/14/15
to google-a...@googlegroups.com, satyanarayana....@a-cti.com
Dear all,

I believe I have found the problem. The problem was related to the urlfetch call (I don't know if dd has also a urlfetch call, could you please tell me???). I did many tests until I isolate the problem. When i did calls only to datastore everything worked as expected. However when I added the urlfetch call it produced the 204 errors. It happened always so I believe that could be a bug.

What I did to get rid of the error was to remove the cloud end point from Google and use a basic servlet. I found that mixing the servlet with the urlfetch call we don't get the error, therefore the problem might not be only related to urlfetch but a combination of urlfetch and Google cloud end point.

We also talked with Google support, they said that the urlfetch problem could be related to our location. I'm in Madrid and our users are in Europe. They said that most of GAE's API are in the states, so that might be a problem.



--
You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/l47rmuVBQs0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-appengi...@googlegroups.com.

To post to this group, send email to google-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
Reply all
Reply to author
Forward
0 new messages