Trying to do something like this will not crash owserver anymore...

#!/bin/bash
while [ 1 ]; do
    /opt/owfs/bin/owget /uncached/10.0000000001/temperature &
    sleep 0.1
done

The conversion will take about 1 second, but the script tries to restart a
new conversion after 0.1 seconds... This will of course not start until the
first conversion is done due to all other existing bus- and device-locks.
This means that there will be many started "owget" processes, but they will
never be able to hang owserver.

After a while you will only receive an error from owget which says something
like:
ServerRead: Error receiving data on /uncached/FF.000000000001/temperature


/Christian


-----Original Message-----
From: Steinar Midtskogen [mailto:stei...@latinitas.org] 
Sent: den 6 juli 2009 15:24
To: owfs-developers@lists.sourceforge.net
Subject: Re: [Owfs-developers] Two owserver problems

[Christian Magnusson]

> So, what is a suitable limitation when reading from a remoteserver? Should
> it be allowed to do 10, 20 or 50 concurrent requests?
> As I can see, something must be really wrong if it increase over 20
> concurrent requests for one single 1-wire adapter.

10 or 20 is probably fine, and 50 sounds too much unless someone can
give a realistic scenario which could require that. 

I guess, 50+ devices on one 1-wire adapter is realistic, and a lazy
programmer (like me) could write a program that queries all of them
simultaniously once in a while leaving the queueing to owserver.  But
I think it's ok if many of the queries then fail.  The most important
thing is to make owserver less likely to crash.

Currently, I can make owserver crash very easily.  I can retest with
your changes to see if it helps.

-- 
Steinar

----------------------------------------------------------------------------
--
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

------------------------------------------------------------------------------
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to