Comments (7)
Ok, I've found the following line in the http.c:
CURL_SETOPT(g_http_handle, CURLOPT_CONNECTTIMEOUT, 1);
So it seems it's hardcoded and not allowed to be changed at runtime.
from pgsql-http.
Ok, I've changed that line to:
CURL_SETOPT(g_http_handle, CURLOPT_CONNECTTIMEOUT_MS, g_timeout_msec);
It seems to be enough for the moment to bypass my connection issue.
from pgsql-http.
I bumped that value way down early in development of the extension because having your backend hang until the 5 minute time-out ended seemed bad (tm). I wonder if curl has an interrupt checker, that could be a good enhancement. In the meanwhile, adding this parameter to the new list of settable parameters seems wise.
from pgsql-http.
The timeout is user-configurable now with commits from #48
from pgsql-http.
It makes sense not to keep the 300s default value. However, thanks for adding it as a user-configurable parameter.
from pgsql-http.
Something weird.
In a function, I set the following options:
SET http.timeout_msec TO 5000;
PERFORM http_set_curlopt('CURLOPT_CONNECTTIMEOUT', '5');
PERFORM http_set_curlopt('CURLOPT_TIMEOUT_MS', '5000');
Then I run SELECT content INTO v_content FROM http_get('someurl');
But I still get the following error message:
Connection timed out after 1000 milliseconds
from pgsql-http.
It seems that each time http_get_handle() function is called, it resets the CURLOPT_CONNECTTIMEOUT
to 1.
So curl_easy_setopt(handle, CURLOPT_CONNECTTIMEOUT, 1);
should only be called once at initialization.
from pgsql-http.
Related Issues (20)
- Undefined symbols for architecture arm64: HOT 1
- Error: invalid cache ID: 78 HOT 1
- send a header along with the post request HOT 1
- PG16 compile error
- build failure "http.c:737:17: warning: ‘http_error_buffer’ may be used uninitialized [-Wmaybe-uninitialized]"
- ERROR: HTTP/2 stream 0 was not closed cleanly: HOT 2
- Violation check constraint "http_method_check" for request 'MKCOL' HOT 7
- Binary File upload HOT 6
- Can't compile against PG16 for latest released 1.5.0 - cut a new release HOT 5
- Handle data with non-standard methods HOT 1
- Deprecation notice CURLOPT_PROTOCOLS is deprecated for curl > 7.85
- Read environment variables for SSL Certificate bundle HOT 2
- Doubts about escape single quote HOT 2
- CURLOPT_DNS_SERVERS "An unknown option was passed in to libcurl" HOT 2
- CURLOPT_SSLCERT_BLOB and CURLOPT_SSLKEY_BLOB
- Include SSL certificate information in the response object HOT 2
- return "content" as bytea HOT 8
- ERROR: HTTP request cancelled HOT 1
- Adding solution to ssl certification issue to README.md
- Setting CURLOPT_TIMEOUT does not have any effect HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pgsql-http.