The day before, I had just completed a round of adjustments to the execution chain of the A Tour of Go Chinese production environment Playground, allowing the “Run” and “Format” requests in the browser to directly access the Playground proxy deployed on the ZgoCloud server.
For the previous deployment and adjustment process, you can refer to:
Records related to ZgoCloud server and Playground proxy deployment
Records related to A Tour of Go Playground browser direct connection proxy
After the adjustments, “Run” and “Format” on the desktop side had been working normally, and real tests on the mobile side had also been successful previously.
However, when I accessed the course page on my phone again the next day, a more troublesome problem occurred:
“Run” and “Format” on the mobile side started to fail intermittently, and the problem could not be consistently reproduced.
Compared to continuous failures, this kind of low-frequency, intermittent fault is actually harder to pinpoint.
Run failures first appeared on the mobile side
I first opened the A Tour of Go Chinese course page in WeChat:
https://go-dev.shuijingwanwq.com/tour/welcome/1
After clicking “Run”, I did not get the normal output of the Go program, but instead received:
Error communicating with remote server.![[Figure 1: Error communicating with remote server. when running the Go example in WeChat]](https://media.shuijingwanwq.com/2026/08/1-57-465x1024.png)
Error communicating with remote server. when running the Go example in WeChat]At this point, the first things that are easy to suspect are:
- WeChat built-in browser compatibility;
- Mobile network;
- Differences between Wi-Fi and 5G;
- Browser failing to directly access ZgoCloud port 8443;
- Proxy anomaly from ZgoCloud to the official Playground.
But what happened next made these judgments far from simple.
Formatting also fails intermittently
On the same phone, “Format” also experienced failures.
However, the error it displayed was not the runtime communication prompt, but rather:
[object Object]![[Figure 2: Clicking "Format" on the mobile side displays [object Object]]](https://media.shuijingwanwq.com/2026/08/2-47-465x1024.png)
[object Object]]This indicates at least two things.
First, the remote Playground request chain that both “Run” and “Format” rely on deserves close inspection.
Second, the frontend’s error handling for formatting failures is itself not user-friendly enough. Even if a network anomaly does occur, the end user should not directly see [object Object] converted from a JavaScript object.
However, before the root cause was determined, I did not rush to modify the frontend error messages.
It was more important to investigate the communication issue first.
Strangely, it quickly returned to normal
Afterwards, I retested WeChat, and running returned to normal.
I then continued testing:
- The phone’s built-in browser;
- QQ Browser;
- Baidu APP;
- Wi-Fi;
- 5G.
All of these environments experienced successful cases.
For example, I subsequently modified the example code again and then ran it:
fmt.Println("Hello, 世界rrrrr")It successfully returned:
Hello, 世界rrrrr![[Figure 3: Running the modified Go code again in the mobile browser succeeds]](https://media.shuijingwanwq.com/2026/08/3-41-465x1024.png)
At this point, a very simple conclusion can basically be ruled out:
The problem is not that “WeChat always fails”, nor is it that “a certain mobile browser always fails”.
It also cannot be attributed to:
Wi-Fi fails, 5G normalOr:
5G fails, Wi-Fi normalBoth network environments can succeed.
Additional verification was also done on the desktop side.
Since this computer might usually use its own network services, I once suspected that the reason the desktop side was always normal was due to a different network path.
So I actively disconnected the relevant network services and retested.
As a result, “Run” and “Format” on the desktop side were still normal.
Therefore, the problem increasingly looks like a genuine intermittent network or client communication anomaly.
Starting to look for evidence in ZgoCloud Nginx logs
Since the browser directly requests the ZgoCloud Playground proxy, the next step is to directly check the server logs.
The current production requests are mainly:
Browser
→ play.go-dev.shuijingwanwq.com:8443
→ ZgoCloud Nginx
→ play.golang.orgAmong them:
POST /compileis responsible for running code,
POST /fmtis responsible for formatting code.
I first tallied all relevant requests for the day and obtained:
52 POST /compile -> 200
11 POST /fmt -> 200
5 OPTIONS /fmt -> 204
2 GET /compile -> 403
1 GET /fmt -> 403![[Figure 4: Request status statistics for /compile and /fmt on that day]](https://media.shuijingwanwq.com/2026/08/4-34.png)
/compile and /fmt on that day]This set of results is very interesting.
Those genuinely originating from the browser’s normal business flow:
POST /compile
POST /fmt
OPTIONS /fmtwere all successful.
Among them:
52 POST /compileall returned:
20011 POST /fmtalso all returned:
200CORS preflight:
5 OPTIONS /fmtwere all:
204The remaining 3 403 were not requests generated by actual users running code, but rather GoogleOther using the GET method to access /compile and /fmt.
The current Nginx configuration only allows normal POST and OPTIONS requests anyway, so these GETs returning 403 is expected behavior.
In other words:
On that day, as long as normal Playground requests actually entered the Nginx access log, not a single 4xx or 5xx actual business failure was found.
But the earliest failed requests did not even enter Nginx
I continued checking the logs against the mobile screenshot times.
The first obvious failure occurred around 14:07.
Checking the Playground access log from 14:05 to 14:10, I only found a normal /compile sent by desktop Firefox at 14:05:50:
POST /compile?backend=
200No corresponding /compile or /fmt from the mobile side were found.
This means that at least this round of failures might have occurred:
Mobile
→ Establishing connection to play.go-dev.shuijingwanwq.com:8443
→ Nginxbefore actually entering Nginx.
But things are not that simple.
Near another frontend failure, Nginx actually logged a 200
In another round of testing around 14:26, the Baidu APP page displayed:
Error communicating with remote server.Yet, in the server logs around the same time, there was:
POST /compile?backend=
HTTP/2.0
200And the User-Agent clearly came from the Baidu APP.
So currently there are at least two different phenomena:
First type:
Mobile side shows failure
→ Nginx has no corresponding requestAnd:
Second type:
Mobile side shows failure
→ Nginx has an HTTP 200 request nearbyHowever, because the current access log does not have a request ID, nor more detailed upstream timing information, it is not yet 100% certain that this second 200 definitely corresponds to that specific failed operation on the page.
This is also the reason for continuing to enhance logging.
No rush to change the proxy architecture, improve observability first
Reaching this point in the investigation, I did not immediately:
- Change 8443 to 443;
- Modify CORS;
- Modify the proxy target;
- Adjust timeout settings;
- Modify the frontend request code.
Because there is no evidence right now that these configurations themselves contain stable errors.
If I directly modified the production architecture just to “solve the problem”, it might just turn an intermittent issue into another problem.
What is truly lacking right now is:
The ability to obtain sufficiently complete evidence the next time a failure occurs.
The original Nginx combined log only showed:
Request
Status code
Response size
User-AgentBut it did not show some very critical information, such as:
$request_time
$upstream_response_time
$upstream_status
$upstream_addrFortunately, the nginx.conf on this OneinStack server already had a JSON log format defined, which includes:
request_time
upstream_time
upstream_host
upstream_statusSo there was no need to re-modify the global log format.
I only needed to add a separate detailed log for the Playground’s 8443 virtual host.
Adding independent debug logs for the Playground
Without changing the original proxy logic, I added:
/data/wwwlogs/play.go-dev.shuijingwanwq.com_debug.logAt the same time, I added a dedicated error log for the Playground:
/data/wwwlogs/play.go-dev.shuijingwanwq.com_debug_error.logThe original:
/data/wwwlogs/play.go-dev.shuijingwanwq.com_nginx.logwas kept.
In other words, this adjustment only added observability capabilities, without modifying:
8443Without modifying:
proxy_passWithout modifying CORS, and without affecting other network services on the server.
After the modifications, I first ran an Nginx configuration check:
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successfulThen I reloaded Nginx.
Verifying the new detailed log
Finally, I actively sent a test request:
package main
func main() {
println("DEBUG-OK")
}The returned result was normal:
{"Errors":"","Events":[{"Message":"DEBUG-OK\n","Kind":"stderr","Delay":0}],"Status":0,"IsTest":false,"TestsFailed":0,"VetOK":true}The new detailed log simultaneously recorded:
"request_time":0.652
"status":"200"
"upstream_time":"0.652"
"upstream_host":"142.251.45.17:443"
"upstream_status":"200"![[Figure 5: First verification of the Playground debug log, recording request duration and upstream status]](https://media.shuijingwanwq.com/2026/08/5-16-1024x164.png)
This means that the complete proxy execution results can now be seen.
In this test:
Client
→ ZgoCloud Nginx
→ play.golang.orgThe total request duration:
0.652 secondsThe upstream response duration was also:
0.652 secondsThe official Playground returned:
200The status that ZgoCloud ultimately returned to the client was also:
200The dedicated error log produced no anomaly records.
This time, I did not forcibly declare “the problem is fixed”
This investigation ultimately did not yield a root cause that could be consistently reproduced.
If it were just to make the end of the article look good, I could have easily picked the most likely problem, fixed it, and written “the failure has been resolved”.
But for this kind of low-frequency, intermittent production issue, I prefer to keep the current conclusion:
The problem has currently returned to normal, but it cannot yet be proven that the root cause has been found.
The currently confirmed facts include:
- The mobile side did experience “Run” failures;
- The mobile side also experienced “Format” failures;
- WeChat, the built-in browser, QQ Browser, and Baidu APP were all able to run normally afterwards;
- Both Wi-Fi and 5G can succeed;
- The desktop can run normally whether or not the original network services are used;
- All normal
/compileand/fmtrequests that entered Nginx on that day returned successfully; - An early mobile failure had no corresponding Nginx access log;
- Near another round of failures, there was a record of a mobile request returning 200;
- There is currently insufficient evidence to attribute the problem to any single layer among the browser, 8443, CORS, ZgoCloud, or the official Playground.
Therefore, the most important outcome this time is not “how much code was modified”, but advancing the production environment from:
Only being able to guess after a problem occursto:
Being able to directly see detailed evidence of the request and upstream chain the next time a problem occursNext steps
Next, I will no longer continue high-frequency manual click testing.
Letting real user access and daily usage naturally generate requests is sufficient.
If “Run” or “Format” failures occur again in the future, I only need to record the time of the failure and then check the new Playground dedicated log to simultaneously confirm:
Whether the request entered NginxFinal HTTP statusActual upstream statusComplete request durationUpstream response durationWhich upstream address was actually connected toIf a genuine anomalous request can be captured next time, there will be sufficient basis to decide whether further adjustments are needed for:
Port
Proxy
TLS
CORS
Timeout
Frontend request logicFor this kind of intermittent failure, rather than quickly modifying the production environment based on a single screenshot, it is better to first equip the system with the ability to answer questions.
This time, I am turning “why it failed” into a question that can be directly verified via logs next time, and then waiting for a genuine anomalous sample to appear.

![[Figure 1: Error communicating with remote server. when running the Go example in WeChat]](https://media.shuijingwanwq.com/2026/08/1-57.png)