-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fork #405
base: master
Are you sure you want to change the base?
Fork #405
Conversation
@@ -49,7 +49,8 @@ void printErrorStream(const char *message) { _printErrorStreamPointer(message); | |||
|
|||
void _printErrorStream(const char *pszMessage) { fprintf(stderr, "%s", pszMessage); } | |||
void _printWarningStream(const char *pszMessage) { fprintf(stderr, "%s", pszMessage); } | |||
void _printDebugStream(const char *pszMessage) { printf("%s", pszMessage); } | |||
// void _printDebugStream(const char *pszMessage) { printf("%s", pszMessage); } | |||
void _printDebugStream(const char *pszMessage) { fprintf(stderr, "%s", pszMessage); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed we can keep this as it was and create a forklogger function which logs to stderr. This can be set as functionpointer in setErrorFunction(serverErrorFunction)
, setWarningFunction(serverWarningFunction)
, and setDebugFunction(serverDebugFunction)
ADAGUC_PATH=/adaguc/adaguc-server-master/, | ||
ADAGUC_TMP=/tmp, | ||
ADAGUC_CONFIG=/adaguc/adaguc-server-master/python/lib/adaguc/adaguc-server-config-python-postgres.xml | ||
command=/adaguc/adaguc-server-master/bin/adagucserver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to discuss if it would be a good solution to start this executable once in the python code. The reasoning is that the python code has logic to calculate the environment variables like ADAGUC_ONLINERESOURCE and others.
python/lib/adaguc/CGIRunner.py
Outdated
@@ -23,6 +24,94 @@ | |||
sem = asyncio.Semaphore(int(ADAGUC_NUMPARALLELPROCESSES)) | |||
|
|||
|
|||
ADAGUC_FORK_UNIX_SOCKET = f"{os.getenv('ADAGUC_PATH')}/adaguc.socket" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be good to be able to set the socket path with an absolute value so it does not have to be in the adaguc-server-master directory
Changes:
$ADAGUC_PATH/adaguc.socket
and listen for connections to the socket.fork()
and handles the client request in the forked process. Python will write theQUERY_STRING
in the socket, and the forked adagucserver process will write it's stdout back via the socket to the python webserver (e.g. aGetMap
will result in adagucserver writing header+binary png data inside the socket).Info:
ldd ./bin/adagucserver | wc -l
yields 103 entries. It could also be due to initialization code inside some of the .so files we link against.MEASURETIME
macro. Look for the loglineReady!!!
. Performing aGetMap
request takes 150 ms according to adagucserver C++. However the same request results in the response headerx-process-time
set to 200 ms. There is about 50 ms overhead (this will depend on your system/OS).Issues to investigate:
/tmp/
does not work in Docker.timeout=300
should be configurable and should be used inside the "background thread that checks/cleans old processes".