Ping multiple sites via Python
The question is tagged python-3.x; this answer assumes 3.2 or higher.

Threading

You can dramatically simplify the code by using a framework for concurrency and
queueing. Specifically, instead of spawning a fixed number of concurrent
threads and managing a queue, your code will be simpler by using an Executor subclass from concurrent.futures (see
https://docs.python.org/3/library/concurrent.futures.html)

Remove the worker function, the queue management logic (including the poison
kill), and create something like this in your if __name__ == '__main__'
block:

import concurrent.futures as futures
urls = [url['url'] for url in ds.getcollection().find()]
with futures.ThreadPoolExecutor(max_workers=32) as executor:
    executor.map(process, urls)


Note the with statement implicitly calls executor.shutdown(wait=True), so 
the block is essentially synchronous. And once the iterable is drained, the 
executor manages clean up.

Functional

This pattern is inherently more functional, though I would not say it's "pure"
functional.  The map() method applies your function process to each of the
items in the associated iterable, spreading the load across available threads
(or processes) in the pool. 

DEBUG duplication

To address the _DEBUG duplication issue (or generally any selective print() output), in similar situations I use a logger:

log = logging.getLogger(__name__)
log.addHandler(logging.StreamHandler(sys.stdout)

if _DEBUG:
    log.setLevel(logging.DEBUG)
else:
    log.setLevel(logging.INFO)


Then, that section becomes:

log.debug("Fetching Urls")
urls = getcollection().find()
log.debug("%d Urls Fetched" % urls.count())
log.debug("pulling urls to the queue")
q = queue.Queue(urls.count())
for url in urls:
    url = url['url']
    q.put(url)
log.debug("pulled urls to the queue")
log.debug("The size of the Queue is %d" % q.qsize())


With no leading if _DEBUG:. Note, though, that if you go with the executor, the queue goes away as well. Play with the levels that work for your needs.

Performance

Honestly, there is not a lot you'll be able to do here above what you are
already doing - your main bottleneck is going to be I/O. For 1m sites in 1
hour, you should be averaging close to 280 requests a second. Play around with
your concurrency (there is a tipping point where too many threads will actually
slow things down) - on an 8 core machine w/ 64 workers, I was only hitting about 100 sites in 1.4 seconds.

Additional notes:


Note that many sites won't return 200 for HEAD requests, so you might consider
a list of "acceptable" codes, which will likely include 301 and 302
You don't need the sleep() calls in the worker function.