Announcement

Collapse
No announcement yet.

mod_lsapi... How can I tell if its working?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • mod_lsapi... How can I tell if its working?

    Sorry if this sounds like a stupid question. CloudLinux has been working great for me for some time.

    Im pretty confident Ive followed the install instructions for mod_lsapi correctly (having read the online docs several times), and I have enabled it for all domains. Following the documented installation steps. Ive added the recommended suhosin config php.ini, and then set it up for native PHP using the following commands:

    /usr/bin/switch_mod_lsapi --build-native-lsphp
    use/usr/bin/switch_mod_lsapi --setup
    cagefsctl --force-update
    service httpd restart

    So... How am I supposed to know if its actually working?

    Am I supposed to see something to the efftect "lsphp"-like processes showing up when running top? Because Im not seeing that.

    Im on CloudLinux v6.6 WHM v11.50.10 Apache 2.4 PHP 5.5

    Secondary question: Is mod-lsapi compatible with xcache?

  • #2
    Hello,

    1) yes, after installation should appears lsphp processes. You should run: switch_mod_lsapi --enable-global (or enable mod_lsapi for single domain) and after service httpd restart:
    /usr/bin/switch_mod_lsapi --build-native-lsphp
    use/usr/bin/switch_mod_lsapi --setup
    switch_mod_lsapi --enable-global
    cagefsctl --force-update
    service httpd restart

    2) Yes, mod_lsapi compatible with xcache

    Comment


    • #3
      "setup" command is responsible only for preparation for mod_lsapi (global or single domain mode).

      Comment


      • #4
        OK... as instructed, the following commands ran successfully:

        /usr/bin/switch_mod_lsapi --build-native-lsphp
        use/usr/bin/switch_mod_lsapi --setup
        switch_mod_lsapi --enable-global
        cagefsctl --force-update
        service httpd restart

        Ive edited /usr/local/apache/conf/conf.d/lsapi.conf to have the following:

        lsapi_backend_connect_timeout 3600
        lsapi_backend_connect_tries 10
        lsapi_backend_children 20
        lsapi_backend_pgrp_max_idle 30
        lsapi_backend_max_process_time 300
        lsapi_debug Off

        Im still not seeing lsphp processes. What other steps are involved?

        Comment


        • #5
          You could check a site using phpinfo.
          create a phpinfo.php file with just a <?php phpinfo(); ?> in it.
          browse it. You should see
          Server API LiteSpeed V6.7.1

          Comment


          • #6
            Hello,

            As I understand output of lsapi.conf above is not full.
            can you show output of command:
            cat /usr/local/apache/conf/conf.d/lsapi.conf

            full file content.

            if phpinfo shows not LiteSpeed V6.7.1 - in this case need deeper investigation, write please to helpdesk.cloudlinux.com

            Comment


            • #7
              phpinfo shows LiteSpeed V6.7.1

              Full cat of lsapi.conf:

              Code:
              LoadModule lsapi_module modules/mod_lsapi.so
              
              AddType application/x-httpd-lsphp .php5 .php4 .php .php3 .php2 .phtml
              
              # Timeout to connect to backend, in usec.
              
              # Optional, default value is 500000.
              
              # Should be more than 0.
              
              # In the case of wrong format default value will be used.
              
              lsapi_backend_connect_timeout 500000
              
              # Number of tries to connect to backend.
              
              # Optional, default value is 20.
              
              # Should be more than 0.
              
              # In the case of wrong format default value will be used.
              
              lsapi_backend_connect_tries 20
              
              # Maximum number of simultaneously running child backend processes.
              
              # Optional, default value is 80.
              
              # Should be more than 1.
              
              # In the case of wrong format default value will be used.
              
              # In the case of value more than 10000, 10000 will be used.
              
              lsapi_backend_children 80
              
              # How long an control backend process will wait for a new request before it exits, in sec.
              
              # 0 stands for infinite.
              
              # Optional, default value is 30.
              
              # Should be more or equal to 0.
              
              # In the case of wrong format default value will be used.
              
              lsapi_backend_pgrp_max_idle 30
              
              # How long a backend child process will wait for a new request before it exits, in sec.
              
              # 0 stands for infinite.
              
              # Optional, default value is 300.
              
              # Should be more or equal to 0.
              
              # In the case of wrong format default value will be used.
              
              lsapi_backend_max_idle 300
              
              # The maximum processing time allowed when processing a request, in sec.
              
              # Optional, default value is 300.
              
              # Should be more than 0.
              
              # In the case of wrong format default value will be used.
              
              lsapi_backend_max_process_time 300
              
              # How many requests each child process will handle before it exits automatically.
              
              # Optional, default value is 10000.
              
              # Should be more than 0.
              
              # In the case of wrong format default value will be used.
              
              lsapi_backend_max_reqs 10000
              
              # Default value is On.
              
              lsapi_terminate_backends_on_exit On
              
              # Default value is /tmp/mod_lsapi
              
              lsapi_socket_path /tmp/mod_lsapi
              
              # lsapi_phprc /etc/
              
              lsapi_debug Off
              
              # Optional, default value is On.
              
              # Check or not owner of DOCUMENT_ROOT.
              
              lsapi_check_document_root On
              
              # Optional, default value is Off.
              
              # Check or not permissions of target script.
              
              lsapi_target_perm Off
              
              # Optional, default value is On.
              
              # Use or not apache uid/gid for request as fallback.
              
              lsapi_use_default_uid On
              
              # uid/gid for requests
              
              # lsapi_uid_gid 500 501
              
              # or user/group for requests instead of lsapi_uid_gid
              
              # lsapi_user_group user1 user1
              
              # Backend core dump enabled or not.
              
              # Default is Off
              
              lsapi_backend_coredump Off
              
              # Option is ignored. It exists for backward compatibility only.
              
              # lsapi_selfstarter On
              
              # Timeout to poll backend.
              
              # Optional, default value is 0.
              
              # Should be >= 0.
              
              # In the case of wrong format default value will be used.
              
              # 0 stands for infinite poll.
              
              lsapi_poll_timeout 0
              
              # Enable or disable processing of the following directives:
              
              #     php_value, php_flag, php_admin_value, php_admin_flag
              
              # Optional, default value is On.
              
              lsapi_mod_php_behaviour On
              
              # Use or not suexec to target user.
              
              # Default is On
              
              lsapi_use_suexec On
              Thanks for the responses. Much appreciated

              Comment

              Working...
              X