'tldextract: Timeout: The file lock 'some/path/to/8738.tldextract.json.lock' could not be acquired

I've been using tldextract for a while in my multiprocess, multithreaded script and it never caused any problems.

Now, it's giving me this error message and I've got no idea where to start looking for the root cause.

The line that actually crashes:

File "/home/user/anaconda3/lib/python3.8/site-packages/tldextract/tldextract.py", line 296, in extract
    return TLD_EXTRACTOR(url, include_psl_private_domains=include_psl_private_domains)

It is possible that the timeout is linked to the increased number of threads that I am using, however, I don't see why tldextract needs to lock anything anyway since the files that the error mentions are supposed to be read-only data files (I think).

In any case, is there a way to increase this timeout perhaps?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source