반응형 sqlachemy2 SQLAlchemy - QueuePool limit of size 5 overflow 10 reached, connection timed out, timeout 30.00 최근 작업요청이 많아지는 것 같더니, 다량의 호출로 인해 Database 접근 오류가 발생하였다. 오류내용은 다음과 같다. QueuePool limit of size 5 overflow 10 reached, connection timed out, timeout 30.00 (Background on this error at: https://sqlalche.me/e/14/3o7r) Error Messages — SQLAlchemy 1.4 Documentation Previous: Third Party Integration Issues Next: Changes and Migration Up: Home On this page: Error Messages Connections and Transactions DBA.. 2024. 3. 25. Sqlachemy - 특정 날짜 하루의 데이터를 가져오기 다음은 SQLAlchemy를 사용하여 특정 날짜 하루의 데이터를 가져오는 코드이다. from sqlalchemy import create_engine from sqlalchemy.orm import Session # 데이터베이스 연결 설정 engine = create_engine("postgresql://user:password@localhost/database") # 세션 생성 session = Session(engine) # 특정 날짜 date = "2024-01-07" # 쿼리 query = session.query(Table).filter(Table.created_at >= date).filter(Table.created_at < date + timedelta(days=1)) # 결과 조회 res.. 2024. 2. 29. 이전 1 다음 반응형