You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please refer to our Stack Overflow tag for guidance.
Facing a weird issue saving response text for a file. This is working fine in Azure linux but not OCI linux. It took 3 minutes to write to file on OCI linux and only a second in Azure linux.
OCI Linux version:
NAME="Oracle Linux Server"
VERSION="8.10"
Azure Linux version:
NAME="Red Hat Enterprise Linux Server"
VERSION="7.9 (Maipo)"
Please refer to our Stack Overflow tag for guidance.
Facing a weird issue saving response text for a file. This is working fine in Azure linux but not OCI linux. It took 3 minutes to write to file on OCI linux and only a second in Azure linux.
OCI Linux version:
NAME="Oracle Linux Server"
VERSION="8.10"
Azure Linux version:
NAME="Red Hat Enterprise Linux Server"
VERSION="7.9 (Maipo)"
Slow environment, ( OCI Linux)
2024-12-12 17:21:45,545 - 41454 - INFO - file receive starts ::
2024-12-12 17:21:59,420 - 41454 - INFO - file receive success ::
2024-12-12 17:21:59,420 - 41454 - INFO - file read starts ::
2024-12-12 17:25:00,603 - 41454 - INFO - file read completes ::
2024-12-12 17:25:00,785 - 41454 - INFO - file write success :: request_test.xml.gz
Working environment (Azure Linux)
2024-12-12 15:44:11,305 - 21602 - INFO - file receive starts ::
2024-12-12 15:44:25,811 - 21602 - INFO - file receive success ::
2024-12-12 15:44:25,812 - 21602 - INFO - file read starts ::
2024-12-12 15:44:35,759 - 21602 - INFO - file read completes ::
2024-12-12 15:44:41,446 - 21602 - INFO - file write success :: request_test.xml.gz
Sudo code
res = requests.request("GET", url, headers = headers, auth=HTTPBasicAuth(by_username,by_password), data=payload)
logging.info("file receive success :: ")
if str(res.status_code) == "200":
logging.info("file read starts :: " )
file_data = res.text.encode('utf8')
#file_data = res.text
logging.info("file read completes :: " )
fileName = 'request_test' + '.xml.gz'
#with gzip.open(fileName, "wb") as f:
with open(fileName, "wb") as f:
f.write(file_data)
#f.write(res.text.encode('utf8'))
The text was updated successfully, but these errors were encountered: