1

I'm trying to connect to an existing DB on the oracle cloud but every time I try to execute the method that takes care of the connection, the execution returns this error: Process finished with exit code 137 (interrupted by signal 9: SIGKILL)

This is my code:

def connectionDb(tracking_1):
dsn_tns = cx_Oracle.makedsn("xxx.xx.xxx.xxx", "1521", service_name="xxx.xx.xxxxxxxxx.xxxxxx.com") # if needed, place an 'r' before any parameter in order to address special characters such as '\'.
conn = cx_Oracle.connect(user="xxxxxx", password="xxxxxxxxx", dsn=dsn_tns) # if needed, place an 'r' before any parameter in order to address special characters such as '\'. For example, if your user name contains '\', you'll need to place 'r' before the user name: user=r'User Name'
c = conn.cursor()
print("connesso")
# c.execute('''SELECT payload
#              FROM SVC_EH.error_instances
#              WHERE tracking_var1= {} '''.format(tracking_1)) # use triple quotes if you want to spread your query across multiple lines
c.execute("SELECT payload FROM SVC_EH.error_instances WHERE tracking_var1 = :mybv", mybv=tracking_1)
for row in c:
  #return print (row[0], '-', row[1]) # this only shows the first two columns. To add an additional column you'll need to add , '-', row[2], etc.
  payload = row[0]
  payload = str(payload)
  return payload
Christopher Jones
  • 9,449
  • 3
  • 24
  • 48
  • Feels like your connection is being actively blocked by something on your client, like anti-virus, firewall, or HIPS software that would stop an outbound network connection. – pmdba Mar 16 '22 at 12:26
  • Searching in other posts it seems that this problem depends on an excessive use of memory even if I doubt it is this case. – mattia.marteddu Mar 16 '22 at 13:29
  • I understood that the problem was due to the need to create an ssh tunnel to the db and then set the host on python so that it points to the localhost – mattia.marteddu Mar 16 '22 at 14:43

0 Answers0