-
Notifications
You must be signed in to change notification settings - Fork 11
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
@cap-js/postgres - cds returns ResourceRequest timed out response. #423
Comments
@BartekCapgemini thanks for the report. There does not seem to be an issue with the default acquire timeout. The problem is most likely related to the fact that the pool implementation has a default The configuration should look something like. {
"cds": {
"db": {
"impl": "@cap-js/postgres",
"pool": {
"max": 10 // configured according to your predicted service load
}
}
}
} Additionally I would like to add that the nature of the Postgres network protocol results in that all queries are executed in sequence. So if you would have a large |
@BobdenOs thank you for reply. Issue happens when user request column (in the smart table, not as a part of larger batch since all other data is loaded beforehand) that is dynamically calculated on the postgres side. This particular column relies on some regular expressions and array calculations but runs just fine when queried on pgAdmin for example. We still get timeouts after 30s so we had to once again increase default values in the source code. |
Description of erroneous behaviour
Hello!
During project development I have faced a problem which seems to be related to the acquireTimeoutMillis and destroyTimeoutMillis values.
We use quite big view that takes some time to process on the server side. Sadly, it takes so long that it causes timeouts which breaks the application flow. Frontend application sends usually 4-7 requests in batch to the server. Usually, first requests are handled without issues but whenever we select something from this bigger view it has to process a lot of data - all following requests are getting timed out. This issue happens mostly when requests are sent in batches. I can easily read this big entity without any issues.
Timeouts were appearing exactly 1 second after request was sent so we quickly found out that it might be something related to the postgres plugin.
Here is the error stacktrace from application logs
For now we managed to temporarily fix the issue by increasing the timeouts values in the source file source code So my question is whether this timeout time could be increased or somehow exposed for configuration in package.json.
Thanks in advance!
Details about project
The text was updated successfully, but these errors were encountered: