google-compute-engine"/>
  • 15
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

I have a compute engine VM instance with a docker image. It has a server that does expensive computations that take around 2 minutes for each request.

The server responds perfectly for small requests. For larger ones it responds with the following:

<HEAD><TITLE>Connection Timed Out</TITLE></HEAD>
<BODY BGCOLOR="white" FGCOLOR="black">
<FONT FACE="Helvetica,Arial"><B>
 Connection Timed Out</B></FONT>

<!-- default "Connection Timed Out" response (504) -->
</BODY>

The server in my docker container does not return this.

Looking at what 504 errors mean:

The server, while acting as a gateway or proxy, did not receive a timely response from the upstream server specified by the URI (e.g. HTTP, FTP, LDAP) or some other auxiliary server (e.g. DNS) it needed to access in attempting to complete the request.

Note: Note to implementors: some deployed proxies are known to return 400 or 500 when DNS lookups time out.

That clearly shows that compute engine has a proxy that times out after 30 seconds and gives the above response.

Looking at the stackdriver logs I see that my server does receive the request and does process it, but before it's finished, I get the response above instead.

How do I stop compute engine from intervening with my server logic? Or at least how do I increase the timeout limit?

      • 1
    • Could you provide more information: 1. What's machine type of your VM? 2. Why requests take up to 2 min? 3. Did you configure your web server to keep sessions for up to 2 min? 4. Why do you think that compute engine "intervening" "server logic"?
      • 2
    • I edited my question. 1) n1-standard-2. 2) It does expensive computations. 3) Yes. I wrote the server. 4) It's a 504 response that my server does not return.
    • Please provide configuration of your web server that makes it able to keep your clients waiting up to 2 minutes while your server does computing. Also, it'll be useful to know architecture of your service. As you can find in the documentation GCE doesn't use any proxies by default.

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags