serpbear
serpbear copied to clipboard
502 Bad Gateway
Hello i am facing an issues Ubuntu 22.04 Docker 4gb ram. docker crash everyday. Any idea
[0] <--- Last few GCs ---> [0] [0] [14:0x7f3784903280] 2191032 ms: Scavenge (reduce) 924.2 (998.2) -> 924.1 (999.2) MB, 8.1 / 0.0 ms (average mu = 0.985, current mu = 0.969) allocation failure; [0] [14:0x7f3784903280] 2191155 ms: Mark-sweep (reduce) 925.1 (999.2) -> 924.6 (1000.2) MB, 120.3 / 0.0 ms (average mu = 0.957, current mu = 0.482) allocation failure; scavenge might not succeed [0] [0] [0] <--- JS stacktrace ---> [0] [0] FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory [0] node server.js exited with code SIGABRT [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] ERROR Making Cron Request.. [1] SyntaxError: Unexpected token < in JSON at position 0 [1] at JSON.parse (<anonymous>) [1] at Response.json (node:internal/deps/undici/undici:6160:23) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
In the issue title you wrote 502 Bad Gateway, but I am not seeing that in the error log you posted. Can you please let me know where you are seeing the 502 error?
Every 50 min i have to restart docker container https://serp.vivacoda.com/
Can you please answer my question? It will help me pinpoint the issue.
And also, try login to your docker container with ssh, and open the cron.js file and replace it with the code found here https://haste.zneix.eu/raw/mosydadoby and then restart the container and see if the issue still occurs or not.
Thanks any idea where i can find it? Ubuntu latest docker. I am unable to find the file
first run docker ps -a to get all the running docker containers.
Then notice the name of the serpbear docker container. Suppose its xxx, in that case, run the following to ssh into it.
sudo docker exec –it xxx /bin/bash
Once you are logged in, cd into app directory, and the cron.js file should be inside it.
I got this
OCI runtime exec failed: exec failed: unable to start container process: exec: "/bin/bash": stat /bin/bash: no such file or directory: unknown
In that case, try this: sudo docker attach xxx
Nothing happend really strange i wait like 5 min
Please try the methods described here to ssh into the container: https://stackoverflow.com/a/48835704/391955