Python LiteSpeed LSAPI 503 Error

Discussion in 'Linux Support: RHEL, CentOS, SUSE etc' started by Catie, Mar 5, 2018.

Tags:
  1. Catie

    Catie New Member

    I followed the documentation found:
    https://www.litespeedtech.com/docs/lsapi/python

    Currently running OpenLiteSpeed 1.4.30, CentOS 7, Python 2.7.5

    Downloaded the latest wsgi 1.4, setup everything exactly as described..

    When trying to review my "test code" I get Error 503, Service Unavailable. The logs don't indicate a problem from what I've seen. Has anyone else run across this and have a suggested fix?

    Thanks,
    Catie
     
  2. lskagan

    lskagan Administrator

    Did you check stderr.log? What code are you trying to run?

    Can you try the following:
    Code:
    def application(environ, start_response):
      start_response('200 OK', [('Content-Type', 'text/plain')])
      return ['Hello World!\n']
    
    Save it as hello.wsgi and try to visit it?
     
  3. Catie

    Catie New Member

    That is the exact code I'm running as I followed the example provided.

    Here are the entries of stderr.log
    --
    Cgid: Child process with pid: 8801 was killed by signal: 9, core dump: 0
    Cgid: Child process with pid: 9190 was killed by signal: 9, core dump: 0
    Cgid: Child process with pid: 9632 was killed by signal: 9, core dump: 0
    Cgid: Child process with pid: 9624 was killed by signal: 9, core dump: 0
    --

    Any help is appreciated :)
     
  4. Tishu

    Tishu Member

    Hello,

    can you post the settings from OLS webadmin. I will test them on my local server.
     
  5. Catie

    Catie New Member

    Please find the attached screenshots.
    external_app.png script_handler.png
     
  6. Tishu

    Tishu Member

    hello,

    Just to inform you that we are looking in to this and when we have more information we will post it.
     
  7. Catie

    Catie New Member

    Awesome :) looking forward to hearing from you, I've had a few other people I know look at it and it's been very perplexing to say the least.
     
  8. Tishu

    Tishu Member

    Hello,

    Sorry for the delay!

    So in the External App edit your lswsgi and add:

    For Environment - LSAPI_CHILDREN=35
    For Instances - 1

    After that save and restart OLS.
     

Share This Page