1

Every once in a while, the temp folder on my deployment server seems to go missing. I am using Flask and Newspaper on AWS elastic beanstalk. I am using the Newspaper library to scrape meta tags from external urls.

Error on the server: {'code_content': 500, 'error': "[Errno 2] No such file or directory: '/tmp/.newspaper_scraper/article_resources'"}

Everything works fine after the server is restared. Is there a config setting that might fix this?

ayushsubedi
  • 57
  • 1
  • 4

1 Answers1

3

We've had a similar problem using AWS Elastic Beanstalk platform "Java 8 running on 64bit Amazon Linux". There was a daily cron-job (/etc/cron.daily/tmpwatch) running that deletes all files in the /tmp folder that are older than 10 days.

Try placing the .newspaper_scraper folder somewhere else.

Jaap
  • 48
  • 5
  • Same here, all my temp files disappeared after 10 days. This was the only reference I could find that explained it - it's not documented anywhere in AWS! – Locutus Apr 06 '22 at 02:27