How to disable timeout for nginx?

It may not be possible to disable it at all, yet a feasible workaround is to increase the execution time. On a nginx tutorial site, it was written: If you want to increase time-limit for all-sites on your server, you can edit main nginx.conf file: vim /etc/nginx/nginx.conf Add following in http{..} section http { fastcgi_read_timeout … Read more

Simple timeout in java

Can anyone guide me on how I can use a simple timeout in java? Basically in my project I’m executing a statement br.readLine(), which is reading a response from a modem. But sometimes the modem isn’t responding. For that purpose I want to add a timeout. I’m looking for a code like:

Setting Curl’s Timeout in PHP

See documentation: http://www.php.net/manual/en/function.curl-setopt.php CURLOPT_CONNECTTIMEOUT – The number of seconds to wait while trying to connect. Use 0 to wait indefinitely.CURLOPT_TIMEOUT – The maximum number of seconds to allow cURL functions to execute. also don’t forget to enlarge time execution of php script self:

How to sleep for five seconds in a batch file/cmd

One hack is to (mis)use the ping command: Explanation: ping is a system utility that sends ping requests. ping is available on all versions of Windows. 127.0.0.1 is the IP address of localhost. This IP address is guaranteed to always resolve, be reachable, and immediately respond to pings. -n 6 specifies that there are to be 6 pings. There is a … Read more

How to set timeout on python’s socket recv method?

The typical approach is to use select() to wait until data is available or until the timeout occurs. Only call recv() when data is actually available. To be safe, we also set the socket to non-blocking mode to guarantee that recv() will never block indefinitely. select() can also be used to wait on more than one socket at a time. If you have … Read more

Getting “Lock wait timeout exceeded; try restarting transaction” even though I’m not using a transaction

You are using a transaction; autocommit does not disable transactions, it just makes them automatically commit at the end of the statement. What is happening is, some other thread is holding a record lock on some record (you’re updating every record in the table!) for too long, and your thread is being timed out. You … Read more