T taylorw Active Member Licensed User Nov 15, 2017 #1 Hi all, i using php to get data from my server mysql database. Code like below. Code: Copy Sub ExecuteRemoteQuery(Query As String, JobName As String) Dim job As HttpJob job.Initialize(JobName, Me) job.PostString("http://www.XXX.com/countries.php", Query) End Sub But my question is how to change the timeout limit, because i reading some bigger data but over 30+/-sec it have error like that. Code: Copy ResponseError. Reason: java.net.SocketTimeoutException, Response: java.net.SocketTimeoutException
Hi all, i using php to get data from my server mysql database. Code like below. Code: Copy Sub ExecuteRemoteQuery(Query As String, JobName As String) Dim job As HttpJob job.Initialize(JobName, Me) job.PostString("http://www.XXX.com/countries.php", Query) End Sub But my question is how to change the timeout limit, because i reading some bigger data but over 30+/-sec it have error like that. Code: Copy ResponseError. Reason: java.net.SocketTimeoutException, Response: java.net.SocketTimeoutException
DonManfred Expert Licensed User Longtime User Nov 15, 2017 #2 Search the forum how to change the timeout for a httpjob. I´m sure you´ll find the answer Upvote 0
T taylorw Active Member Licensed User Nov 15, 2017 #3 Thanks @DonManfred, because i don't know the keyword. Upvote 0
DonManfred Expert Licensed User Longtime User Nov 15, 2017 #4 Sure you have! Note that the issue is not a "Mysql php connection timeout" but it is a Httpjob Timeout Power on your brain and use the Search for these terms Upvote 0
Sure you have! Note that the issue is not a "Mysql php connection timeout" but it is a Httpjob Timeout Power on your brain and use the Search for these terms
Y yge Member Licensed User Nov 16, 2017 #6 In case you didn't manage to find what you need, this is the answer: Make sure you have OkHttp library enabled. Add this row at the end: Code: Copy job.GetRequest.Timeout = 60000 You can adjust the value (60000 = 60 seconds) Upvote 0
In case you didn't manage to find what you need, this is the answer: Make sure you have OkHttp library enabled. Add this row at the end: Code: Copy job.GetRequest.Timeout = 60000 You can adjust the value (60000 = 60 seconds)
KMatle Expert Licensed User Longtime User Nov 17, 2017 #7 taylorw said: ResponseError. Reason: java.net.SocketTimeoutException, Response: java.net.SocketTimeoutException Click to expand... To be honest: - If your request takes more than 0.5 secs there must be a design issue in your app - If you want to download 10000 rows -> Dont' do that (except there is an acceptable reason which is not given in 99.99% of all cases) - If you want do download MB's of data -> see #2 Good practice: - if your request needs more than 0.5 (secs) there MUST be a design issue (bad db design, indexes wrong, etc) - Only download what the USER can handle at one time (e.g. 50 rows max.) - download more only if he/she REALLY NEEDS it - if you need to download huge data use (s)ftp - if it's a batch job (like to process 100.000 rows -> don't do that with an app, it's a server's job or B4J) -> even here: Only load 100 rows at one time! My requests (millions of rows in a db) take about 0.05 secs MAX! so I always DECREASE the timeout to 2 secs (if something really goes wrong like bad internet connection) Upvote 0
taylorw said: ResponseError. Reason: java.net.SocketTimeoutException, Response: java.net.SocketTimeoutException Click to expand... To be honest: - If your request takes more than 0.5 secs there must be a design issue in your app - If you want to download 10000 rows -> Dont' do that (except there is an acceptable reason which is not given in 99.99% of all cases) - If you want do download MB's of data -> see #2 Good practice: - if your request needs more than 0.5 (secs) there MUST be a design issue (bad db design, indexes wrong, etc) - Only download what the USER can handle at one time (e.g. 50 rows max.) - download more only if he/she REALLY NEEDS it - if you need to download huge data use (s)ftp - if it's a batch job (like to process 100.000 rows -> don't do that with an app, it's a server's job or B4J) -> even here: Only load 100 rows at one time! My requests (millions of rows in a db) take about 0.05 secs MAX! so I always DECREASE the timeout to 2 secs (if something really goes wrong like bad internet connection)