timeout

How to make @Schedule method to be called only once at a time

假如想象 提交于 2021-02-10 04:34:05
问题 We are using the @Schedule EJB annotation to start a scheduled job do a delta SOLR import every x seconds. Of course we want to have as less timeshift in indexing as possible. Currently I try to do the delta every 5 seconds. So my question is: Can I make sure the job is only called once? So let's say the indexing is lasting longer than 5 seconds, will the next schedules call wait until the previous is coming back? 回答1: Yes. You can make the bean a @Singleton and use @Lock(LockType.Write) to

How to make @Schedule method to be called only once at a time

情到浓时终转凉″ 提交于 2021-02-10 04:33:25
问题 We are using the @Schedule EJB annotation to start a scheduled job do a delta SOLR import every x seconds. Of course we want to have as less timeshift in indexing as possible. Currently I try to do the delta every 5 seconds. So my question is: Can I make sure the job is only called once? So let's say the indexing is lasting longer than 5 seconds, will the next schedules call wait until the previous is coming back? 回答1: Yes. You can make the bean a @Singleton and use @Lock(LockType.Write) to

Tomcat 7 times out during start up

做~自己de王妃 提交于 2021-02-08 09:47:09
问题 I'm running Tomcat 7 on Eclipse Indigo. Every now and then, Tomcat times out on start-up. A hit-and-miss solution I've found is to run Tomcat with the same server name and host name. I do this repeatedly and sometimes it works, sometimes it doesn't. I've also tried rotating HTTP ports between 8080, 9080, and 8081 but, as far as I'm concerned, this problem does not depend on the port. I'm also sure that the only Tomcat running is Eclipse's; I check my Task Manager. I'm wondering if anyone here

Python SSL FTP connection timing out

陌路散爱 提交于 2021-02-08 06:58:46
问题 I'm trying to get a connection established to a FTP server with SSL from within Python (v3.3.0). But I keep getting a timeout. I am NOT using port 990 as the SSL port (paranoid). Would that be the cause of this problem? And if so, how do I specify the port I am using? Here's my script: from ftplib import FTP from ftplib import FTP_TLS ftps = FTP_TLS('ip address') ftps.auth() ftps.sendcmd('USER uname') ftps.sendcmd('PASS password') ftps.prot_p() ftps.retrlines('LIST') ftps.close() And here is

How to set Timeout for Django Rest HTTP request

和自甴很熟 提交于 2021-02-08 06:26:19
问题 I am using Python 3.5, Django 1.9.5 and Django Rest Framework 3.3.3. I have only few POST apis in my server. How can I set Timeout for each rest http request that if the execution for a request takes more then 3 minutes than it should return timeout in response and should stop execution of that request. Thanks :) 回答1: I think you will need to set this at the proxy/web server level. With nginx you can use proxy_read_timeout: proxy_read_timeout 180s; Or you could set it at the application

How to set Timeout for Django Rest HTTP request

ⅰ亾dé卋堺 提交于 2021-02-08 06:26:09
问题 I am using Python 3.5, Django 1.9.5 and Django Rest Framework 3.3.3. I have only few POST apis in my server. How can I set Timeout for each rest http request that if the execution for a request takes more then 3 minutes than it should return timeout in response and should stop execution of that request. Thanks :) 回答1: I think you will need to set this at the proxy/web server level. With nginx you can use proxy_read_timeout: proxy_read_timeout 180s; Or you could set it at the application

Timeout error in Python geopy geocoder

匆匆过客 提交于 2021-02-07 22:02:03
问题 I am a relatively new Python user and am attempting to use a function to return the latitude and longitude for a city and country using the "geopy" module. I have had errors because my city was misspelled which I have managed to catch. The trouble I am now having is that I am encountering a timeout error. I have read this question Geopy: catch timeout error and adjusted my timeout parameter accordingly. However it now runs for varying lengths of time before I get a timeout error. I have tried

Timeout error in Python geopy geocoder

微笑、不失礼 提交于 2021-02-07 22:01:36
问题 I am a relatively new Python user and am attempting to use a function to return the latitude and longitude for a city and country using the "geopy" module. I have had errors because my city was misspelled which I have managed to catch. The trouble I am now having is that I am encountering a timeout error. I have read this question Geopy: catch timeout error and adjusted my timeout parameter accordingly. However it now runs for varying lengths of time before I get a timeout error. I have tried

Bean Transaction Timeout in WebSphere using EJB Timer

依然范特西╮ 提交于 2021-02-07 13:38:51
问题 With JBoss/Wildfly one is able to use the @TransactionTimeout proprietary annotation and define a transaction timeout for a specific Session Bean. What is the equivalent way of doing it using IBM WebSphere ? We are using EJB Timer and one of the Beans will over an hour to complete. Sample code for Wildfly: import org.jboss.ejb3.annotation.TransactionTimeout; @Stateless @TransactionTimeout(value=7200) public class TimerBean { } Note: Using WebSphere 8.5. Modifying the global transaction time

Bean Transaction Timeout in WebSphere using EJB Timer

梦想与她 提交于 2021-02-07 13:38:36
问题 With JBoss/Wildfly one is able to use the @TransactionTimeout proprietary annotation and define a transaction timeout for a specific Session Bean. What is the equivalent way of doing it using IBM WebSphere ? We are using EJB Timer and one of the Beans will over an hour to complete. Sample code for Wildfly: import org.jboss.ejb3.annotation.TransactionTimeout; @Stateless @TransactionTimeout(value=7200) public class TimerBean { } Note: Using WebSphere 8.5. Modifying the global transaction time