# Apache Update Today

I take the unusual measure of hosting this site, and this blog, on my home computer, which I name ‘Phoenix’. This requires that I forward all requests to my URL, to My Home IP Address. Hence, if you’re on a Linux computer and want my current IP address, you’d just type in:


host dirkmittler.homeip.net



But of course, in order to host a Web-site, I also need to be running a fully-configured Web-server. Under Linux, this pretty much implies running Apache.

The version of Apache on this box was just updated this evening, to version ‘2.4.10-10+deb8u10‘. When the server is updated like this, a post-install command is also given to restart it, since otherwise the new software will not have been loaded into RAM, nor running. But this should not cause much of a disruption, because essentially it just causes a connection to disappear for about 2 seconds.

The reason for that would be, the fact that each HTTP Request is handled separately, and after each HTTP Request has fetched a page, or an update to a page, the CGI-Script that did so exits. This means that if the reader is noticing a ‘stateful session’, which has persistent data from one page-reload to the next, this actually requires that a database act as a back-end to the site, and that the Web-server’s CGI-Scripts can act as a client to that database. And cookies on the browser, in certain cases, identify a session. For readers of this blog who are not logged-in, such cookies are not being used.

In my case, it’s a MySQL server.

One thing that might however happen to a reader, due to such a server-restart, is that an established session gets interrupted momentarily. This would have happened around 19h45 this evening.

The reason that can happen, is the use of Web-sockets on this site. Essentially, only the browser’s initial request to connect, is actually made to Port 80 of the server. After that, the session of one particular browser (client) is handed off to a Web-socket, which is actually some obscure port on my computer, owned by an Apache sub-process.

If the sub-process is killed, any browsers that were still connected to it would have experienced a disconnection. Because browsers tend to ‘remember’ which Web-socket they were connected to when simply prompted to reload a page, this disconnection might last until the reader restarts his browser.


dirk@Phoenix:~$ps fu -A | grep apache dirk 16564 0.0 0.0 15428 2092 pts/2 S+ 23:22 0:00 \_ grep --color=auto apache root 11137 0.0 0.7 397184 31308 ? Ss 19:45 0:00 /usr/sbin/apache2 -k start www-data 11143 0.1 1.7 475680 68840 ? S 19:45 0:17 \_ /usr/sbin/apache2 -k start www-data 11144 0.1 1.8 478148 72124 ? S 19:45 0:15 \_ /usr/sbin/apache2 -k start www-data 11281 0.1 1.8 477188 70632 ? S 19:46 0:19 \_ /usr/sbin/apache2 -k start www-data 11470 0.1 1.7 477144 69976 ? S 19:47 0:16 \_ /usr/sbin/apache2 -k start www-data 11659 0.1 1.8 478008 71616 ? S 19:56 0:16 \_ /usr/sbin/apache2 -k start www-data 13626 0.1 1.7 477040 69960 ? S 21:28 0:08 \_ /usr/sbin/apache2 -k start www-data 14075 0.1 1.8 478296 71416 ? S 21:48 0:07 \_ /usr/sbin/apache2 -k start www-data 14077 0.1 1.8 477900 72072 ? S 21:48 0:07 \_ /usr/sbin/apache2 -k start www-data 14078 0.1 1.7 475420 67680 ? S 21:48 0:07 \_ /usr/sbin/apache2 -k start www-data 14522 0.1 1.8 478696 71856 ? S 22:02 0:05 \_ /usr/sbin/apache2 -k start dirk@Phoenix:~$



Dirk

This site uses Akismet to reduce spam. Learn how your comment data is processed.