Very often, it is enough to configure TCP keepalive on the database client or server to get rid of the problem. If that is the case, you will see nothing in the PostgreSQL log, or perhaps a message like unexpected EOF on client connection with an open transactionĬould not receive data from client: Connection reset by peerĪgain, there are several possible causes, but the most likely cause is a mis-configured firewall, router or other network component that drops TCP connections that idle for too long. a software bug (often in a third-party extension) caused the server to crash.We use Automate to upload files to a variety of different partners and suppliers. data corruption caused the server to crash Connection is closed when uploading to sftp server.the Linux out-of-memory killer killed the process ( terminated by signal 9: Killed).These are too numerous to list, but here are a few frequent ones: In that case, you have to determine the cause of the crash. Terminating any other active server processesĪll server processes terminated reinitializingĭatabase system was not properly shut down automatic recovery in progress You would there see messages like: server process (PID. This is easy to determine: look at the PostgreSQL log. In fact, just figuring out what exactly is going on is half the way to the solution, so here you go. You cannot expect an explanation why this happens, because you give insufficient information for that. 11:04:07.As you say, this question comes up again and again. 11:04:07.571 GMT LOG: could not receive data from client: Connection reset by peer 11:04:07.569 GMT LOG: could not receive data from client: Connection reset by peer 11:04:07.568 GMT LOG: could not receive data from client: Connection reset by peer I get tunnel unexpectedly closed and when I check the errors is says my pub. 11:04:07.566 GMT LOG: could not receive data from client: Connection reset by peer I have been able to connect to my localhost install(s) using a non-SSH. 11:04:07.565 GMT LOG: could not receive data from client: Connection reset by peer 11:04:07.563 GMT LOG: could not receive data from client: Connection reset by peer 11:04:07.562 GMT LOG: could not receive data from client: Connection reset by peer This is my PostgreSQL(deploy in kubernetes cluster) log look like: 11:03:34.794 GMT LOG: could not receive data from client: Connection reset by peer Logger.error("session management error", e) Why would this happen? what should I do to fix this problem? BTW, this is my session scope look like: session_scope(): Message: 'query rss source by id error'Īrguments: (OperationalError('(psycopg2.OperationalError) server closed the connection unexpectedly\n\tThis probably means the server terminated abnormally\n\tbefore or while processing the request.\n'),) File "/root/pydolphin/dolphin/common/db/rss_source.py", line 61, in select_channel_by_id 11:52:36.932 4411 ERROR: could not send data to WAL stream: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. Source = rss.select_channel_by_id(channel_id) Following your suggestion I turned on async and printed the dsn - all as I was expecting and set (including the port number and sslmode). I get the same error when I try connecting from psql. File "/root/pydolphin/dolphin/tasks/tasks.py", line 33, in pull_channel_impl In the server logs, Im actually seeing a different port with every connection attempt - which I certainly didnt expect. Error connecting to the server: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. When I run to this code, shows error like this: File "/usr/local/lib/python3.9/site-packages/celery/app/trace.py", line 731, in _protected_call_ Logger.error("query rss source by id error", e) Rss = local_session.query(RssSource).filter(RssSource.id = channel_id).one() I am using sqlalchemy( sqlalchemy=1.4.6) to do a query, the database is PostgreSQL 13, this is my Python 3 code look like: def select_channel_by_id(self, channel_id):
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |