Reputation: 43
Getting this error in the GitHub job run and the run is stopping with error code 134.
Earlier it was working with size=4092.
We are running this on GitHub self-hosted runners with OS Linux
I have tried the memory size 8GB and 16GB with the below command but getting the same error.
Error in run- [3540:0x6918dd0] 4287822 ms: Scavenge 7973.4 (8149.9) -> 7972.9 (8162.2) MB, 18.0 / 0.0 ms (average mu = 0.140, current mu = 0.079) allocation failure
NODE_OPTIONS: "--max-old-space-size=8192"
NODE_OPTIONS: "--max-old-space-size=16384"
Is there any solution to this issue?
Upvotes: 0
Views: 492
Reputation: 137
worker_connections: 16384 (for heavy frontend applications) [nginx default is 512 connections per worker, which is too low for modern applications]
use: epoll (efficient method) [nginx supports a variety of connection processing methods]
http: add following things to free your worker from getting busy in handling some unwanted task. (client_body_timeout , reset_timeout_connection , client_header_timeout,keepalive_timeout ,send_timeout).
3.Now code level debugging: In your main server file , remove unwanted console.log which is just printing a message.
data => if(data) res.send(data) // do you really need to wait for data or that api returns something in response which i have to wait for?? , If not then modify like this:
data => res.send(data) // this will not block your thread, apply everywhere where it's needed
else part: if there is no error coming then simply return res.send({}) , NO console.log here.
error part: some people define as error or err which creates confusion and mistakes. like this:
error => { next(err) } // here err is undefined
err => {next(error) } // here error is undefined
app.get(API , (re,res) =>{ error => next(error) // here next is not defined })
remove winston , elastic-epm-node other unused libraries using npx depcheck command.
In the axios service file , check the methods and logging properly or not like :
if(successCB) console.log("success") successCB(response.data) // here it's wrong statement, because on success you are just logging and then successCB
sending outside the if block which return in failure case also.
Upvotes: 0