timeout

Python stops unexpectedly after 1 minute

Python stops unexpectedly after 1 minute Question: My Python program stops functioning after exactly 1 minute. Regardless of the code’s size, the program stops after exactly 1 minute. Here is some very simple code: import time seconds = 60 print(f"Trying to print ‘Hello’. Wait {seconds} seconds.") for second in range(1,seconds): time.sleep(1) print(f"{second}…") print("Hello") It first …

Total answers: 2

How to check and set up the Couchbase timeout using the Python SDK?

How to check and set up the Couchbase timeout using the Python SDK? Question: I’m searching a way how to check the current value of Couchbase cluster timeout, and how to set up a desired timeout using the Python SDK. I know the method to set up a timeout using ClusterTimeoutOptions but it doesn’t work. …

Total answers: 1

Timeout reading a post request containing heavy dictionnary

Timeout reading a post request containing heavy dictionnary Question: I am receiving a POST request containing a 3 mB Json dictionary. When i receive de POST, my view tries to read the args in the request but that causes a timeout on the Heroku server. When i try it locally, it works fine though. Here …

Total answers: 1

In GCP Dataflow/Apache Beam Python SDK, is there a time limit for DoFn.process?

In GCP Dataflow/Apache Beam Python SDK, is there a time limit for DoFn.process? Question: In Apache Beam Python SDK running on GCP Dataflow, I have a DoFn.process that takes a long time. My DoFn takes a long time for reasons that are not that important – I have to accept them due to requirements out …

Total answers: 1

Python Socket accept() Timeout

Python Socket accept() Timeout Question: Using sockets, the below Python code opens a port and waits for a connection. Then, it sends a response when a connection is made. import socket ip = 127.0.0.1 port = 80 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind((ip, port)) s.listen(1) conn, addr = s.accept() conn.send(response) conn.close() If a …

Total answers: 2

Python trying to send request with requests library but nothing happened?

Python trying to send request with requests library but nothing happened? Question: Like the title said, im trying to send request a url using requests with headers, but when I try to print the status code it doesn’t print anything in the terminal, I checked my internet connection and changed to test it but nothing …

Total answers: 2

Timeout within session while sending requests

Timeout within session while sending requests Question: I’m trying to learn how I can use timeout within a session while sending requests. The way I’ve tried below can fetch the content of a webpage but I’m not sure this is the right way as I could not find the usage of timeout in this documentation. …

Total answers: 2

Handling infinite loops in ctypes function with Python

Handling infinite loops in ctypes function with Python Question: Let’s say I have a several functions defined in C, one of which results in an infinite loop. I am using the ctypes module in Python to run each of these functions, and hence it results in an infinite loop resulting to a complete halt in …

Total answers: 2