Hello my python file __init__.py contains
from flask import Flask
from waitress import serve

app = Flask(__name__)
@app.route("/")
def hello():
    return "Hello, Flask!"

@app.route("/GP")
def helloGP():
    return "Hello, Flask GP!"

@app.route("/test1a")
def testSalim():
    minute    = 100000000
    nDelay = 0
    for X in range(minute):
        nDelay = nDelay+1
    # return jsonify(data = nDelay)
    return str(nDelay)

if __name__ == "__main__":
    serve(app)

my wsgi file 

#!/usr/bin/python
import sys
sys.path.insert(0,"C:/Apache24_Py/htdocs")
from helloworldapp import app as application

and in virtual host file
<VirtualHost *:5000>
    ServerName 127.0.0.1:5000
    ServerAlias 192.168.2.15:5000
    ErrorLog "logs/app2-error.log" 
    CustomLog "logs/app2-access.log" common

    
    #WSGIDaemonProcess 127.0.0.1:5000 processes=2 threads=25
    WSGIScriptAlias / 
'C:/Apache24_Py/htdocs/helloworldapp/helloworldapp.wsgi'
    Alias /static/ 'C:/Apache24_Py/htdocs/helloworldapp/static'
    <Directory 'C:/Apache24_Py/htdocs/helloworldapp/static'>
    Require all granted
    </Directory>
</VirtualHost>

While I call the api in postman with url

http://localhost:5000/test1a gives result in 8.69s

if this same api call by two users at a time the result will be 8.69s for 
one user and 15.35s for other user. Why is this like this ? Please help me 
to solve this. I am using Os windows 10 apache2.4 ad python 3.10.

I start the apache by calling httpd in the bin folder from cmd and call the 
url in postman with get method. My apache log shows this

[Thu Aug 18 12:15:13.617380 2022] [mpm_winnt:notice] [pid 18340:tid 420] 
AH00455: Apache/2.4.54 (Win64) OpenSSL/1.1.1p mod_fcgid/2.3.10-dev 
mod_wsgi/4.9.3 Python/3.10 PHP/8.1.9 configured -- resuming normal 
operations

But in my apache log its showing equal time for the response.

192.168.2.62 - - [18/Aug/2022:12:16:55 +0530] "GET /test1a HTTP/1.1" 200 9 
192.168.2.15 - - [18/Aug/2022:12:16:55 +0530] "GET /test1a HTTP/1.1" 200 9 

How can I solve this. please help and thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to modwsgi+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/modwsgi/a977075b-8cee-4069-92a4-028d6f064505n%40googlegroups.com.

Reply via email to