Search Engine: Elastic

Article ID: 114328, created on Jul 10, 2012, last review on Jul 14, 2018

  • Applies to:
  • Operations Automation

Caching service shstg is running on each webserver in NG cluster. It retrieves data from Configuration Database (CDB) server, caches it and provides to Apache, ProFTPD, NSS plugins. It manages connections to the NG cluster configuration database, also it caches data it gets from the database. Automatically switches to replica if the main configuration database is inaccessible.

Caching server gets information from CDB server using functions defined in PostgreSQL server (on CDB server):web_cluster_db74=> \df *h2e*
                                      List of functions
 Schema |             Name             |        Result data type        | Argument data types
 public | h2e_append_web_prefix        | text                           | text, text
 public | h2e_bytea2text               | text                           | bytea
 public | h2e_denormalize_ip           | text                           | text
 public | h2e_domain_wc                | text                           | character, text
 public | h2e_find_webspaces_by_ftp_ip | setof v_apache_h2e_websites    | text, text
 public | h2e_find_webspaces_by_ip     | setof v_apache_h2e_websites    | text
 public | h2e_find_webspaces_by_login  | setof v_apache_h2e_websites    | text
 public | h2e_find_webspaces_by_name   | setof v_apache_h2e_websites    | text
 public | h2e_find_webspaces_by_userid | setof v_apache_h2e_websites    | bigint
 public | h2e_get_def_certificate      | bytea                          |
 public | h2e_get_notifications        | setof apache_h2e_notifications |
 public | h2e_join_arrn                | text                           | text[]
 public | h2e_post_notification        | boolean                        | integer, bigint
 public | h2e_prepare_vhost            | text                           | text
 public | h2e_purge_notification       | boolean                        | text
 public | h2e_text2bytea               | bytea                          | text
(16 rows)

Also caching service manages queues containing web site Apache log buffers.

Logs writing is buffered in the Apache NG module. There is one common buffer for all web sites handled by one web server in the NG cluster. Buffer is flushed once a 10 seconds or if  it reaches 16MB – whatever happens earlier. These values can be modified in the /etc/h2e_shstg.conf file by adding tags 'flush-interval' and 'max-allowed-buffer-size'.

Caching service components:

  • Startup script: /etc/init.d/shstg
  • Binary: /usr/sbin/shstg_srv
  • Configuration file: /etc/h2e_shstg.conf
    • List of Configuration Database servers with login credentials
    • Performance settings (max database queue size)
  • Log file: /var/log/h2e-shstg.log
    • Log verbosity can be increased by adding –v<verbosity level> option to shstg_srv command line arguments, e.g. in the /etc/init.d/shstg file. Restart of the shstg service is required.
    • Without restart – use the command ’/usr/sbin/shstg_srv -v <level> /etc/h2e_shstg.conf’. Available verbosity levels can be obtained by running ‘/usr/sbin/shstg_srv --help’ command.
    • Available log levels are:
      • 0 - error
      • 1 - notice
      • 2 - debug
      • 3 - profile

See the main Knowledgebase article #114326 Linux Shared Hosting NG: General Information, Best Practices and Troubleshooting for more information about NG Hosting in Parallels Automation.

caea8340e2d186a540518d08602aa065 5356b422f65bdad1c3e9edca5d74a1ae e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF