Ruby on rails 无法使用nginx启动rails应用程序

Ruby on rails 无法使用nginx启动rails应用程序,ruby-on-rails,amazon-web-services,nginx,amazon-ec2,lets-encrypt,Ruby On Rails,Amazon Web Services,Nginx,Amazon Ec2,Lets Encrypt,我在aws服务器上使用我的应用程序,今天我达到了空间限制,它向我显示了以下消息/home/ubuntu/.rbenv/libexec/rbenv init:line 131:无法为此处创建临时文件文档:设备上没有剩余空间,我可以用它增加存储量,但仍然无法显示我的网页。 通过执行以下命令,nginx-t将显示以下内容 nginx: [warn] the "user" directive makes sense only if the master process runs with super-u

我在aws服务器上使用我的应用程序,今天我达到了空间限制,它向我显示了以下消息
/home/ubuntu/.rbenv/libexec/rbenv init:line 131:无法为此处创建临时文件文档:设备上没有剩余空间
,我可以用它增加存储量,但仍然无法显示我的网页。 通过执行以下命令,nginx-t将显示以下内容

nginx: [warn] the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1
nginx: [emerg] BIO_new_file("/etc/letsencrypt/live/nace.network/fullchain.pem") failed (SSL: error:0200100D:system library:fopen:Permission denied:fopen('/etc/letsencrypt/live/nace.network/fullchain.pem','r') error:2006D002:BIO routines:BIO_new_file:system lib)
nginx: configuration file /etc/nginx/nginx.conf test failed
我的应用程序是在RubyonRails5中与passenger和nginx一起开发的,以前它工作没有任何问题,但我不明白为什么它会向我显示这个错误

更新:

我再次访问了服务器,它继续向我发送以下警告:

/home/ubuntu/.rbenv/libexec/rbenv-init: line 131: cannot create temp file for here-document: No space left on device
我执行以下命令
df-h
,它显示以下内容:

Filesystem      Size  Used Avail Use% Mounted on
udev            2.0G   12K  2.0G   1% /dev
tmpfs           396M  364K  395M   1% /run
/dev/xvda1       26G   15G  9.5G  62% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
none            5.0M     0  5.0M   0% /run/lock
none            2.0G     0  2.0G   0% /run/shm
none            100M     0  100M   0% /run/user
overflow        1.0M  1.0M     0 100% /tmp
在项目中使用
tail-f log/production.log
时,会显示以下错误:

I, [2020-02-21T18:50:38.283374 #12760]  INFO -- : [5636754d-ca36-43f2-afcf-b0a025d3adca] Started GET "/" for 190.198.232.67 at 2020-02-21 18:50:38 +0000
I, [2020-02-21T18:50:38.284158 #12760]  INFO -- : [5636754d-ca36-43f2-afcf-b0a025d3adca] Processing by HomeController#index as HTML
D, [2020-02-21T18:50:38.285317 #12760] DEBUG -- : [5636754d-ca36-43f2-afcf-b0a025d3adca]    (0.1ms)  SELECT COUNT(*) FROM `users`                                                                                               
D, [2020-02-21T18:50:38.355268 #12760] DEBUG -- : [5636754d-ca36-43f2-afcf-b0a025d3adca]    (69.4ms)  SELECT COUNT(*) AS count_all, `users`.`city` AS users_city FROM `users` GROUP BY `users`.`city`                           
I, [2020-02-21T18:50:38.355476 #12760]  INFO -- : [5636754d-ca36-43f2-afcf-b0a025d3adca] Completed 500 Internal Server Error in 71ms (ActiveRecord: 69.6ms)
F, [2020-02-21T18:50:38.356099 #12760] FATAL -- : [5636754d-ca36-43f2-afcf-b0a025d3adca]   
F, [2020-02-21T18:50:38.356136 #12760] FATAL -- : [5636754d-ca36-43f2-afcf-b0a025d3adca] ActiveRecord::StatementInvalid (Mysql2::Error: Error writing file '/tmp/MYkVaUQs' (Errcode: 28 "No space left on device"): SELECT COUNT(*) AS count_all, `users`.`city` AS users_city FROM `users` GROUP BY `users`.`city`):
F, [2020-02-21T18:50:38.356157 #12760] FATAL -- : [5636754d-ca36-43f2-afcf-b0a025d3adca]   
F, [2020-02-21T18:50:38.356179 #12760] FATAL -- : [5636754d-ca36-43f2-afcf-b0a025d3adca] app/controllers/home_controller.rb:12:in `index'
更新2

当执行命令df-hP/tmp时,我得到如下结果:

Filesystem      Size  Used Avail Use% Mounted on
overflow        1.0M  108K  916K  11% /tmp
它告诉我temp是一个不同的分区,它是1MB,我注意到错误只出现在我进行查询的家中,我假设它带来的数据大于1MB。我正在寻找如何将根目录用于临时文件,而不是/temp分区,但我没有办法做到这一点,根据第页,我可以在这里禁用它们/etc/fstab,但我没有看到文件中的/temp行,只有以下内容:

LABEL=cloudimg-rootfs   /    ext4   defaults,discard    0 0
/dev/xvdb   /mnt    auto    defaults,nobootwait,comment=cloudconfig 0   2

你试图用sudo运行命令

$ sudo service nginx restart
还是跟苏多一起

#service nginx restart

感谢您的回复,使用“sudo”可以重新启动服务器,不会出现任何问题,它不再显示“fail”,但页面仍然不工作,访问它时会显示以下消息:很抱歉,但出现了问题。您可以运行
$df-hP/tmp
?看到下面的我可以找到问题,很明显分区/temp非常小(1mb),当在家中进行查询时,它会向我显示错误,有没有办法让它在临时文件中生根?我更新了文章的更多细节。你应该调整/tmp分区的大小