title: Python threads stack_size and segfaults
body: <p>A web crawler script that spawns at most 500 threads and each thread basically requests for certain data served from the remote server, which each server's reply is different in content and size from others.</p>
  
  <p>i'm setting stack_size as 756K's for threads</p>
  
  <pre><code>threading.stack_size(756*1024)
  </code></pre>
  
  <p>which enables me to have the sufficient number of threads required and complete most of the jobs and requests. But as some servers' responses are bigger than others, and when a thread gets that kind of response, script dies with SIGSEGV. </p>
  
  <p>stack_sizes more than 756K makes it impossible to have the required number of threads at the same time. </p>
  
  <p>any suggestions on how can i continue with given stack_size without crashes?
  and how can i get the current used stack_size of any given thread? </p>