If the client receives a message like Not
enough server threads available for this query [-1010011] ['QXA11']
,
the query requires more kernel threads for the IQ store.
Wait for another query to finish and release the threads it is using. Then resubmit your query.
Run the system stored procedure sp_iqconnection. The column IQThreads contains the number of IQ threads currently assigned to the connection. This column can help you determine which connections are using the most resources. Remember that some threads may be assigned but idle.
If the condition persists, you may need to restart
the server and specify more IQ threads. Use the -iqmt server
startup switch to increase the number of processing threads that Sybase IQ can
use. The default is 60 threads per CPU for the first four CPUs and
50 threads per CPU for the remainder, plus threads needed for database
connections and background tasks. For example, on a system with
12 CPUs and 10 connections: 60*4 + 50*(numCPUs
- 4) + numConnections + 3 = 653
.
The minimum value is numConnections + 3
.
The total number of server threads cannot exceed 4096 on 64-bit
platforms, or 2048 on 32-bit platforms. See “Starting
the database server” in Chapter
1, “Running the Database Server,” in the Utility Guide.
If the server runs out of threads, or if sufficient
threads are not available to a connection during a restore, Sybase IQ may
return the error Ran out of threads. Start up
server with more threads.
(SQLCODE -1012024).
The RESTORE command will try to allocate a “team” of threads
for the restore operation. Sybase IQ will try to allocate at least
one thread per backup device plus two threads per CPU, plus one
thread to the “team” for the restore. Make sure
that enough threads have been allocated on a per connection and
per team basis as well as to the server. See “MAX_IQ_THREADS_PER_CONNECTION
option”and “MAX_IQ_THREADS_PER_TEAM
option” in “Database
Options,” in Reference: Statements and Options.