I need some assistance trying to understand the how and why my seriate is locking up.
I have an internal reporting webiste, that amongst other things can produce a KML file of a network trace.
The trace is already in a SQL table which has a list of cables and hardware joining. I can vary from 10 to 100 objects in a trace.
I have a secondary table which stores the Lat/Long points of all the hardware objects.
When a user requests a KML file, it basically just joins these 2 tables together, there is some internal SQL functions to push multiple points into a single table column, but really its a very simple SQL query.
Usually it’ll take 3-5 seconds depending on the complexity of the trace.
Its the front end website that turns the list and points into an actual KML. So the server itself isn’t generating the KML and sending that, but just the underlying information.
An example of the data being returned
137605256 MUXXXXXX 1 Cable CableName 69-70 1554388 xx.xxxxxx, xx.xxxxxx, xx.xxxxxx, xx.xxxxxx, xx.xxxxxx, xx.xxxxxx xx.xxxxxx, xx.xxxxxx, xx.xxxxxx, xx.xxxxxx, xx.xxxxxx, xx.xxxxxx
137605257 MUXXXXXX 4 Enclosure JointName 615866 xx.xxxxxx xx.xxxxxx
So, I’ve found out, after 10 requests of this data, seriate locks up. I can continue to send requests to the backend, which the server acknowledges, but the process of requesting additional SQL data just doesn’t do anything.
Here is the chunk of code that I’m using for requesting data from SQL:
sql.getTransactionContext()
.step('kmldata',
{
query: sql.fromFile('./sql/KMLDataCollection.sql'),
params:
{
circuitId:
{
type: sql.NVARCHAR(50),
val: data.circuit
}
}
})
.end(function (result)
{
resolve(result.sets.kmldata);
})
.error(function (err)
{
logger.warn('KMLDataCollection Failed', {reason: err});
reject(err);
});
If I continue to request data, it will get into the sql.getTransactionContext(), but nothing further happens. I don’t know why. After a period of time that I haven’t worked out, it is longer then the timeout period, the server will come good again. So I assume that something times out or resets.
If anyone has any suggestions as to why or ways I could query seriate to find out if its broken/locked up and internally reset it, I would be really grateful.