SQLAlchemy with postgres: crash sqlalchemy connection with thread parallelism,

16 views
Skip to first unread message

Ramin Farajpour Cami

unread,
Dec 15, 2021, 11:29:30 AM12/15/21
to sqlalchemy
Hi, 

I'm was testing the project by fastapi + sqlalchemy, i write golang code for sending thread parallelism to the my API endpoint, I found a problem, in the sqlalchemy many requests fail, 

this is my config : 

SQLALCHEMY_DATABASE_URL = config("DATABASE_URL")
engine = create_engine(SQLALCHEMY_DATABASE_URL)

SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)

I took a video of this problem,




We do not know exactly how to solve the problem. sqlalchemy must cover many requests connection.

Thanks,
Ramin

Jonathan Vanasco

unread,
Dec 20, 2021, 9:14:41 PM12/20/21
to sqlalchemy
Please submit a "Short, Self Contained, Correct (Compilable), Example" along with any potential bug reports.

http://sscce.org/
Reply all
Reply to author
Forward
0 new messages