LoginSignup
4
5

More than 5 years have passed since last update.

Lambda実行時に 'No space left on device'とエラーが出るときの対処法

Last updated at Posted at 2019-01-25

現象

同じlambdaのファンクションを何度も実行していたら表題のエラーが出ました。
検索をかけてもディスクの容量や、Inodesがいっぱいなので容量を空けましょうみたいな記事が引っ掛かったので確認してみても容量は十分空いていたため、そのままハマってしまいました。

error.log
OSError: [Errno 28] No space left on device

結論

一時作業ディレクトリの/tmp配下の容量がいっぱいになっているようでした。
なのでlambda関数内の最後に、

lambda.py
call('rm -rf /tmp/*', shell=True) 

を入れて実行毎にファイルを削除してあげると解決します。

4
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5