Closes #17 (closed)
Summary
Fixes two bugs that prevented Beacon from working correctly under concurrent load and with filtered queries.
Changes
beacon/omop/init.py — Increased connection pool size:
- pool_size=35, max_overflow=20, pool_timeout=30, pool_recycle=1800
- Beacon now handles 50+ simultaneous requests without failures
beacon/omop/utils.py — Fixed peek() function:
- Added list-to-iterator conversion before calling next()
- Resolves 500 error when using SNOMED, Gender or any other filter
Testing
Verified with Apache Benchmark: 200 requests at 50 concurrency, 0 failures. Also tested filtered queries (SNOMED, Gender) returning correct results.