0

I'm creating API using Golang.

When I tested with Postman, I can see api and postgresql work well.

But, when I started to test with Jmeter, I sent 10000 posts simultaneously.

A few posts make an error. Like this

dial tcp 127.0.0.1:5432: connectex: No connection could be made because the target machine actively refused it. 

There is an error in the line that makes db row.

I'm currently using gorm library for mapping objects.

Below code is makes error part.

var dbClient *gorm.DB
dbClient.Create(&{...object something})
3
  • 3
    You may be exceeding database connection limits, or open files limit. Commented Apr 4, 2021 at 23:24
  • @BurakSerdar Is increasing max_connections a good way? I don't know well backend knowledge... Commented Apr 4, 2021 at 23:34
  • 1
    That might take care of the db connection issue, if that's the issue. You have to find out the root cause. That was just a guess, and many things might be wrong here. Commented Apr 4, 2021 at 23:58

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.