Vincent Teyssier
Vincent Teyssier

Reputation: 2217

uwsgi start fails but does not log any error

I have set up a uwsgi service on a ubuntu 12.04.

Here is the custom config file I am using:

[uwsgi]
# this is the path to the virtualenv
home = /var/www/api/webservice/current/

# this will point to the same file
paste = config:/var/www/api/webservice/production.ini

socket = /tmp/my_api.socket
gid = www-data
uid = www-data
logdate = true
master = true
harakiri = 30
limit-as = 1536
reload-on-as = 1200
no-orphans = true
log-x-forwarded-for = true
threads = 15
workers = 2
stats = /tmp/my_api_stats.socket
listen = 400

When I run sudo service uwsgi start I get "Fail". But the log in /var/log/uwsgi/app/my_api.log doesn't show any error message.

How can I debug this ?

Upvotes: 2

Views: 3310

Answers (3)

Mangu Singh Rajpurohit
Mangu Singh Rajpurohit

Reputation: 11420

If you are using debian based linux os, you will find log for you app by default in /var/log/uwsgi/app/log.

I also had hard time, while debugging the reason for the failure of starting of uwsgi service. For me uwsgi --ini this_config_file.ini worked fine, but service uwsgi start was failing without giving much information.

Upvotes: 2

abcdn
abcdn

Reputation: 1457

As a debug step, you could examine your ExecStart command from /etc/systemd/system unit configuration for uwsgi service. Try running that command and see, if there is some more information about the error.

By the way, are you sure your logfile /var/log/uwsgi/app/my_api.log is the one, where the logs are written to? Of course, that could be default, but if it is not, you should have the logto=/path/to/the/log option in your config.

Upvotes: 3

Wojciech Dyżewski
Wojciech Dyżewski

Reputation: 33

Maybe uwsgi --ini this_config_file.ini will help you debug it?

Upvotes: 1

Related Questions