Mailing List Archive

Davical with Nginx and FPM, question about locks and davical-cli
Hi all!

I was planning to upgrade my Davical servers. I was thinking on setting
them up with Nginx and FPM (php 7). I have read that Nginx has a dav
handler that should allow methods like MKCOL or PROPFIND, PROPATCH,
etc... How is your experience in this sense?. I have seen that Debian
installs it with mod_php by default when you install the Davical
package... I think it all (FPM and Nginx) should work. Shouldn't it?.

By the way, I have another question. Sometime ago, I suffered some
issues due to database locking when, for instance, Thunderbird tried to
sync a new addressbook of a user (with 100 contacts for instance) and
tried to upload contacts from ten to ten (as an example). So, as I don't
have a single Davical instance balanced across different php servers, I
could create a fast and not the best, but a fully functional fix. Each
user in Davical would always be modified by only a single process of
PHP... so by a single connection to that database. As changes are fast I
was able to keep waiting some miliseconds to the other processes (trying
to modify the same user) and after perhaps a couple of seconds all the
updates needed were done. This way I avoid the issues like I had
sometime ago with Thunderbird (I don't know if it still has this kind of
issues... or another caldav client...). I have read some locking
improvements have been performed. The locking improvements, have
something to do with the kind of locking I commented, like the one I
suffered with Thunderbird?.

My third question is about davical-cli. I contributed (with my company
permission to do so... and they will give me again now...) it happily
some years ago. I was wondering if it needs some kind of update for
handling the database stuff, because I would be very happy again on
doing those changes and later contributing them again... Does it need
some modifications for handling actual schemas and so?.

Cheers!,
Re: Davical with Nginx and FPM, question about locks and davical-cli [ In reply to ]
?
Hi Florian!!



Thanks a lot for your answers :) :)



About Nginx, FPM and so... I asked because the last two lines in the General note section in https://wiki.davical.org/index.php/Nginx_Config . That made me think about issues with perhaps MKCALENDAR and so... OK! if it should work I will check :) :) . Was just for clarifying if it should...



About locking... I asked it because in commit id 9eff8f92ae56dab8f5e81e9d369666190bd8b8d5 it seemed you started working in LOCK and UNLOCK methods and... was trying to figure out if that could be used for the purpose I was using for, my patch that only allowed one write operation per user. You know, with the patch, processes started to "fight" for writting chance and only one was allowed at a time. That fixed my issue... I could expose it later in case you see it could help improving Davical. I think it should because... some caldav clients behave horrible... or at least behave like if no transactions or database locks could exist and when Davical say no to them (because at that exactly moment a lock exists..)... they just say that operation not failed... and that's awful for users. The attached patch for a 1.1.4 Davical instance is a summary of what I have applied. As I don't balance between different servers, the same instance, it works (are better ways but works).



Just for improving the locking method I commented. By what I have seen, caldav.php always rely on http auth, so... it doesn't use php sessions, am I wrong?.



I will check the davical-cli and the patches. I was going to do something similar, but just answered in case you remembered something that should be changed....



One more question only mates... Is it possible, to update several versions directly, without moving from each of them?. I assume yes, because that's the reason of database schema patches to exist but... I have some instance, running with very old versions like 1.1.4, is it possible to update directly to 1.1.11 (is the last one by what I have seen)?.



Thank you so much... I'm going to check all these and contribute as much as I can :) :)



Cheers!

---


Egoitz Aurrekoetxea
Dpto. de sistemas
944 209 470
egoitz@sarenet.es
www.sarenet.es
Parque Tecnológico. Edificio 103
48170 Zamudio (Bizkaia)

Antes de imprimir este correo electrónico piense si es necesario hacerlo.


El 2022-10-05 00:07, Florian Schlichting escribió:

ATENCION
ATENCION
ATENCION!!! Este correo se ha enviado desde fuera de la organizacion. No pinche en los enlaces ni abra los adjuntos a no ser que reconozca el remitente y sepa que el contenido es seguro.

Hi Egoitz,

I was planning to upgrade my Davical servers. I was thinking on setting
them up with Nginx and FPM (php 7). I have read that Nginx has a dav
handler that should allow methods like MKCOL or PROPFIND, PROPATCH,
etc... How is your experience in this sense?. I have seen that Debian
installs it with mod_php by default when you install the Davical
package... I think it all (FPM and Nginx) should work. Shouldn't it?.

yes it should; Debian recommends mod_php because it's the easiest to set
up automatically, but other configurations are certainly possible.

By the way, I have another question. Sometime ago, I suffered some
issues due to database locking when, for instance, Thunderbird tried to
sync a new addressbook of a user (with 100 contacts for instance) and
tried to upload contacts from ten to ten (as an example). So, as I don't
have a single Davical instance balanced across different php servers, I
could create a fast and not the best, but a fully functional fix. Each
user in Davical would always be modified by only a single process of
PHP... so by a single connection to that database. As changes are fast I
was able to keep waiting some miliseconds to the other processes (trying
to modify the same user) and after perhaps a couple of seconds all the
updates needed were done. This way I avoid the issues like I had
sometime ago with Thunderbird (I don't know if it still has this kind of
issues... or another caldav client...). I have read some locking
improvements have been performed. The locking improvements, have
something to do with the kind of locking I commented, like the one I
suffered with Thunderbird?.

Unfortunately I don't recall anything about locking; someone else might.

My third question is about davical-cli. I contributed (with my company
permission to do so... and they will give me again now...) it happily
some years ago. I was wondering if it needs some kind of update for
handling the database stuff, because I would be very happy again on
doing those changes and later contributing them again... Does it need
some modifications for handling actual schemas and so?.

I have never had the need to use davical-cli; but it would certainly be
good to check that everything still works as intended. You could take a
look at dba/patches to see what schema changes were made in the
meantime.

Florian
Re: Davical with Nginx and FPM, question about locks and davical-cli [ In reply to ]
Hi Egoitz,

On Wed, Oct 05, 2022 at 09:59:01PM +0200, Egoitz Aurrekoetxea wrote:
> One more question only mates... Is it possible, to update several versions directly, without moving from each of them?. I assume yes, because that's the reason of database schema patches to exist but... I have some instance, running with very old versions like 1.1.4, is it possible to update directly to 1.1.11 (is the last one by what I have seen)?.

yes, that should be possible, the update-davical-database script will
apply all missing database migrations and then you're good to go with
the latest version.

Florian


_______________________________________________
Davical-general mailing list
Davical-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/davical-general