On Thu, Aug 05, 2021 at 08:07:58PM -0700, Anand vishnu wrote: > my code is running absolutely fine with a smaller load, when load is > increased it is failing. > The changes i made in the newer release tag: > 1. pushing data to aerospike at each and every chunk > when i turn off this line it is working fine , but when i turn this on it > is failing
Please consider the following set of facts: * While you did not explain that, "502 errors" appear to mean some HTTP requests complete with the server answering with responses containing the 502 HTTP status code. Sadly, you did not tell us which HTTP requests actually fail this way. * Aerospike does not use HTTP as its client protocol; it implements some custom protocol over TCP sockets, so that 502 * HTTP status code 502 is defined to mean "Gateway Timeout". Based on these facts I could do a guess: you have a setup like this: [your clients] → [http proxy] → [your Go program] → [aerospike] Depending on how your Go server is deployed, you can be easily unaware that an HTTP proxy - such as nginx - is sitting between your server and your clients. When the load from the client increases, the request handling code starts to spend progressively more time in the calls which send data to Aerospike, and eventually some of them spend so much time doing that they surpass a maximum time span configured in that HTTP proxy which any request is allowed to spend. Once a request trips that threshold, the proxy rips it and returns a response to the client, telling it the service it mediates access to is not keeping up. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/20210806171346.scqjtaju4ulwibkj%40carbon.