[Tile-serving] [openstreetmap/mod_tile] mod_tile appears to require a single-process (but can handle multiple threads) Apache server to work correctly (#238)
Stephan
notifications at github.com
Mon Aug 9 05:58:44 UTC 2021
@alankila Do I get it right that the render socket misses a session handling? I would like to understand your problem analysis better.
here the server opens a unix domain socket:
https://github.com/openstreetmap/mod_tile/blob/f28cda992077c38684628cd764742223ab10a3ec/src/daemon.c#L532
PF_UNIX, SOCK_STREAM. To my understanding, the following accept calls will lead to a unique combination of file descriptors managed by the kernel.
https://github.com/openstreetmap/mod_tile/blob/f28cda992077c38684628cd764742223ab10a3ec/src/daemon.c#L237
The man-page confirms that with SOCK_STREAM you have a connection. This means well known communication partners.
https://man7.org/linux/man-pages/man2/socket.2.html
SOCK_STREAM
Provides sequenced, reliable, two-way, connection-based
byte streams.
So at least on socket/connection level the rendering daemon should know well which response belongs to which request.
the loop calls `rx_request` to process a command:
https://github.com/openstreetmap/mod_tile/blob/acb11808d62a81b2d2c357425ea0917bc55631a3/src/daemon.c#L276
This one knows about connection details in a data structure `item`
https://github.com/openstreetmap/mod_tile/blob/acb11808d62a81b2d2c357425ea0917bc55631a3/includes/gen_tile.h#L30
So I do not yet understand where the connection detail should get lost. The client sending out a request should get exactly their answer back, as the connection is maintained in the `item` structure.
Can you provide a maybe synthetic reproduction case which shows the problem? You mentioned that the "missing" requests had actually completed. So we can exclude error cases? What environment are you running? Do you have AppArmor/SELinux rules in place?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/mod_tile/issues/238#issuecomment-894968885
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20210808/bffa2bfc/attachment.htm>
More information about the Tile-serving
mailing list