-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CORE-1336] DB connection pool exhausted querying products #3907
Comments
#3906 and this issue could be related |
@SGFGOV – can I get you to ensure your products are published and the category is active + visible? :) |
All products have been published and the category is active and visible |
In fact curl has no problem receiving the info |
the server responds like so ::ffff:172.31.34.235 - - [25/Apr/2023:01:56:55 +0000] "GET /store/products?category_id%5B0%5D=pcat_01GYFXKX2EHPNN29C9143AV8GY&limit=1 HTTP/1.1" - - "-" "axios/1.2.1" |
It hangs inside typeorm/driver/postgres/PostgresQueryRunner.js line 69 using typeorm 0.3.14 |
Ok so i figured this out. the reason was the pool was exhausted. Now I'm able to query 5 categories at a time.. I'm sure these are not optimal values. but I'm able to query 5 categories at a time without the server hanging |
Thanks for sharing this @SGFGOV - helps a lot. We will investigate this issue asap and keep you posted. This take high priority for us. |
Are you using the inventory and stock location modules? |
Yes..I am using them..but have not added any data to those.. not dependent on inventory at the moment. Still fixing catalogue |
I can confirm that this issue seems to be related to |
Amazing thanks! |
@olivermrbl fantastic..looking forward to the fix |
This comment was marked as off-topic.
This comment was marked as off-topic.
@olivermrbl Any luck here? Will this make it to the release ? |
@SGFGOV, my apologies. I never reverted to this issue. The problem should be resolved by now. Let me know if this is not the case :) |
Bug report
Describe the bug
const catProduct = (
await this.client.products.list({
categories: [medusaCategory.id],
limit: 1,
})
).products;
results in an axios response:-
data: {
type: 'invalid_data',
message: 'property categories should not exist'
}
results in an error
However, when I query like so
There is no response to the client, and server seems to be ignoring the request and the client hangs.. awaiting response from server (medusa)
The complete code snipet
async onModuleInit() {
this.medusaService = (await this.moduleRef.get(MedusaService, {
strict: false,
})) as MedusaService;
const medusaCategories = (
await this.medusaService.client.productCategories.list({
limit: 100,
})
).product_categories;
this.categories = await Promise.all(
medusaCategories.map(
async (t) => await this.medusaService.convert2FrontendCategory(t),
),
);
}
async convert2FrontendCategory(medusaCategory: MedusaCategory) {
const catProduct = (
await this.client.products.list({
categories: [medusaCategory.id],
limit: 1,
})
).products;
System information
Medusa version (including plugins): 1.8.2
Expected behavior
It shouldn't hang
CORE-1336
The text was updated successfully, but these errors were encountered: