Sybase: kscsinit: connectivity library error. Operation: cs_ctx_alloc()

After restarting a Sybase ASE server, the dataserver did not come up again and the following error messages was at the end of the error log:

kscsinit: connectivity library error. Operation: cs_ctx_alloc()

If you google for this error message, you oddly find many things related to locales. So I tried setting different values for LC_ALL before starting the data servers. But this didn’t help.

The next idea was to compare the current SYBASE.cfg with the previous one. And there was one difference:
number of user connections was increased from 170 to 300. But this happened 5 months ago… So it shouldn’t be the cause of the problem… Since it was running late, we tried setting it back anyway and there it was, our server was up and running again !

I first wondered whether someone had set it manually in the config file instead of setting it in isql using sp_configure. I was sure that Sybase would tell me than it didn’t have enough memory if the value was too high. So I typed in the following in isql:

sp_configure 'number of user connections', 300
go

And to my surprise ASE just informed me that it was using some more memory with this setting but didn’t complain… So it looks like the value was too high to be able to start but it was fine to set it later on. So now we just need to remember that if we restart ASE, we will probably need to reduce the number of user connections and then increase it again using isql… Strange world…

Leave a Reply

Your email address will not be published. Required fields are marked *