AGI and fastAGI time out?

how I can change the time out of calling to AGI from dialplan?
According my check call to fastAGI that not return after 15, the dial plan stuck on the channel!

I continue check this. and I find that if the server fail in middle of process of AGI, and socket fail, the calling is return (the AGISTATUS=SUCCESS!)
but if the AGI continue process like eternity loop, the channel not get the control back even after 1h.

what your opinion?