-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
ECONNRESET in Azure Postgres #19
Comments
Hey @apitzele, unfortunately we can't help you if you don't provide us all informations necessary to reproduce your case. This means, always post:
As soon as you provide us all information needed, we have an easy way to reproduce your problem and provide you with the help or bugfix you need. Thank you. |
Hello @wzrdtales, This is our enviroment: I reproduced the issue in a bare server.js (below) with only the db-migrate dependencies included (see package.json also below) This is the full output:
server.js
package.json
|
Hey @apitzele, unfortunately, this is still missing the verbose run. As I wont pay any money on Azure, I will not be able to reproduce this, so I will need your help to provide me with all the stack traces. Your examples look fine, also I don't know why your setup was build so complicated, while everything in this would be completely equal to passing no custom config at all and just setting the DATABASE_URL environment variable. Did you removed parts from here or why is this? Can you execute just a pure db-migrate up command on that azure service? |
The only thing that I can see is, that it seems to eliminate the connection after it is done with everything. So somewhere in the closing routine. Does it execute any mirgrations though? |
When there are migrations to run, they will all complete successfully. However, it will always fatal sometime afterwards. Since it's an ECONNREST, I'm assuming the crash occurs during disconnect. Also, I keep the log level set to 5 which should emit debug/verbose level logs.
Is there another flag I should be setting? Would you like to see Node's logs? |
In regards, to your question above, your assumption was correct. The example I posted with the custom config was just extracted from the application (so it had a bit more complexity than required for a bare bones demo). However, I can reproduce the issue without a custom config. |
Actually the log level setting for this intend is kind of wrong. But good thing that you outline this, as we can make this easier for users and add this to the API directly though. Loglevel is set binary, 5 would mean just info and error, 15 would catch all levels while verbose can only be triggered if you have the global I would really need to know the verbose level logs though. Everything I know is that it seems to fail after the migrations have been done. I can just assume as the error from your error above, that this is happening while actually closing the connection just as you also assume, as the error is on Core Level. This could be due to a non standard behavior and I wouldn't be surprised to see any, I mean we talk about microsoft, that would'nt be the first time though. If this is really the case, no one can actually help you but them. So to figure this out, do the following steps:
Repeat this, but this time use the native pg driver, for this you need to specify in your config native: true and install the the native driver |
To add actually for setLogLevel numbers do not work at all. You can pass either a string like {
"sql": true,
"info": true
} |
I am using the new managed Postgres service in Azure. My application doesn't have a problem connecting to actual PostgreSQL databases. However, a migrate up against the managed database consistently results in a fatal exception that occur after the migration completes.
Since the migrations run successfully, the problem seems to be related to how the connection is getting terminated.
The application uses the latest version of db-migrate for node and the most recent pg driver.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: