darold / ora2pg

Ora2Pg is a free tool used to migrate an Oracle database to a PostgreSQL compatible schema. It connects your Oracle database, scan it automatically and extracts its structure or data, it then generates SQL scripts that you can load into PostgreSQL.
http://www.ora2pg.com/
GNU General Public License v3.0
1.01k stars 343 forks source link

DBD::Pg::db pg_putcopyend failed: SSL SYSCALL error #1137

Open sabirlas opened 3 years ago

sabirlas commented 3 years ago

We are copying tables from Oracle to Azure PostgreSQL in parallel job mode using below command

ora2pg -t COPY -J 64 -a 'TABLE[AUTHOR]' -T /data1/migration/plit_lob_copy/temp_data -c ../ora2pg.conf

After running for some time it is giving below error. Can you help to fix it.

DBD::Pg::db pg_putcopyend failed: SSL SYSCALL error: Connection timed out at /usr/local/share/perl5/Ora2Pg.pm line 15042.gress. FATAL: SSL SYSCALL error: Connection timed out

darold commented 3 years ago

I would like to help but this is a network issue, you may have a firewall or possibly at Azure side that is resetting the connection leading to this timeout. I think that in this case Ora2Pg could try to reconnect to the remote host before dying, I mark this issue as need enhancement to not forget.

sabirlas commented 3 years ago

Hi darold Thank you for you reply. I would like to share one thing which I have observed. When I run this command on a on-premise staging postgresql database it creates 64 session in Oracle and only one session on the postgresql. But if I run it to copy it to Azure Postgresql (PAAS) it creates 64 sessions in postgreSQL as well. Any idea why it on azure also it is having 64 sending sessions. Could this be the reason of some sessions are getting terminated with the mentioned error after sometime.

Below is the server settings regarding timeout on Azure PostgreSQL PAAS idle_in_transaction_session_timeout 0 statement_timeout 0 tcp_keepalives_idle 0 tcp_keepalives_interval 0