I'm getting OSError: [Errno 24] Too many open files
error when using multiprocessing.Pool
. The export
function connects to a database, exports data into a file, uploads to S3, and removes the file from the filesystem.
with Pool() as pool:
results = pool.map(export, work, 1)
for result in results:
logger.info(result)
Any ideas why this is happening?