Apache::Backend::POE - Communicate with a POE server using persistent connections


 # Configuration in httpd.conf:

 PerlModule Apache::Backend::POE

 # use in
        host => 'localhost',
        port => 2021,
        alias => 'poeky'

 # in your mod_perl script

 # use in mod_perl handler
 my $poe = Apache::Backend::POE->connect(
        host => 'localhost',
        port => 2021,
        alias => 'poeky'
 unless (defined $poe) {
        return SERVER_ERROR;

 # use msg_send and msg_read like the example POE server


This module allows you to communicate with a POE server using persistent connections.


The module should be loaded upon startup of the Apache daemon. Add the following line to your httpd.conf or

 PerlModule Apache::Backend::POE

A common usage is to load the module in a startup file via the PerlRequire directive.

There are two configurations which are server-specific and which can be done upon server startup:

 Apache::Backend::POE->connect_on_init(host => $host, port => $port, alias => $alias);

This can be used as a simple way to have apache servers establish connections on process startup. Alias defaults to 'backend'

 Apache::Backend::POE->setPingTimeOut($timeout, $alias);

This configures the usage of the ping method, to validate a connection. Setting the timeout to 0 will always validate the connection using the ping method (default). Setting the timeout < 0 will de-activate the validation of the connection object. Setting the timeout > 0 will ping the connection only if the last access was more than timeout seconds before. Alias defaults to 'backend'

For the menu item 'Backend POE connections' you need to call Apache::Status BEFORE Apache::Backend::POE ! For an example of the configuration order see

To enable debugging the variable $Apache::Backend::POE::DEBUG must be set. This can either be done in or in the user script. Setting the variable to 1, just reports about a new connect. Setting the variable to 2 enables full debug output.


Note that this module needs mod_perl-1.08 or higher, apache_1.3.0 or higher and that mod_perl needs to be configured with the appropriate call-back hooks:


Also, Storable should be the same version on both the client and server.


Apache::Backend::POE might not work under mod_perl 2.0. Please send patches.


See the examples directory for a POE server to get you started.


  • Authentication

  • SSL encryption

  • Rollback support

  • Create Backend::POE module for non mod_perl applications.

  • Improve the documentation.

  • Support for other serializers like YAML.


File bug reports at:


Apache, mod_perl, POE, Filter::Reference


David Davis <>


Ask Bjoern Hansen, and Edmund Mergl for Apache::DBI


Copyright 2005 by David Davis and Teknikill Software

This libaray is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 332:

'=item' outside of any '=over'

Around line 350:

You forgot a '=back' before '=head1'