Re: [Chicken-users] example from rpc egg crashes at around 2k calls for me ....

2015-12-10 Thread Jim Ursetto
It would coincide with a typical fd ulimit of 2048.  If the issue is actually 
too many tcp connections, I can't see why, as both the client and server should 
close the connection after completion. And, you are running these client 
connections serially. Maybe try dummying out the database calls. I think Peter 
is right that it's trying to serialize a database exception and failing. One 
option would be to handle the db open or query exception yourself in your 
server and print out the exception (before reraising it).
Jim

> On Dec 8, 2015, at 17:42, Matt Welland  wrote:
> 
>> On Tue, Dec 8, 2015 at 12:44 AM, Peter Bex  wrote:
>> On Mon, Dec 07, 2015 at 10:38:33PM -0700, Matt Welland wrote:
>> > I don't understand why this is crashing. I'm guessing I'm failing to close
>> > a connection or finalize something. I also saw the same problem when I used
>> > sqlite3 instead of sql-de-lite. Any help or suggestions of where to look
>> > would be appreciated.
>> 
>> From the call chain, it looks like something broke during query execution
>> and it's trying to serialize the exception object, which probably contains
>> a reference to the database connection (which is a pointer).
>> 
>> Try catching all exceptions and raising a placeholder exception with a
>> simple (error "foo")
> 
> Thanks Peter. I'm not sure where to add this but I'll experiment with it 
> tonight.
> 
> I did test on a different system today and it kept going past 6k calls. 
> However running "netstat|wc -l" showed a rapidly increasing number of TCP 
> connections. It seems likely I'm not closing the connection but I don't see 
> where to add the close.
>  
>> 
>> Cheers,
>> Peter
> 
> ___
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-users
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] shared library for c

2015-12-10 Thread Kooda
On Thu, Dec 10, 2015 at 11:58:53PM -0500, Joe Python wrote:
> Is it possible write a shared library in Chicken, say, "libfactorial.a"
> which can be called from a C main program?
> 
> IF then where is the documentation?
> 
> Thank you,
> Jo

It is absolutely possible, this manual section should help you:
http://wiki.call-cc.org/man/4/Interface%20to%20external%20functions%20and%20variables

and in particular this page: http://wiki.call-cc.org/man/4/Embedding
which explains the CHICKEN C API.

-- 
Envoyé depuis ma GameBoy.

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] shared library for c

2015-12-10 Thread Joe Python
Is it possible write a shared library in Chicken, say, "libfactorial.a"
which can be called from a C main program?

IF then where is the documentation?

Thank you,
Jo
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users