# 在 5 美元的 Droplet 上托管的 Discourse 无法正常运行

**URL:** <https://meta.discourse.org/t/hosted-discourse-in-5-droplet-not-working-properly/97251>\
**Category:** Self-hosting\
**Created:** [2018年九月15日 09:03 UTC](https://meta.discourse.org/t/hosted-discourse-in-5-droplet-not-working-properly/97251 "2018-09-15T09:03:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Varun\_Deva](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/varun_deva/32/111170_2.png) [@Varun\_Deva](https://meta.discourse.org/u/Varun_Deva)\
**Post date:** [2018年九月15日 09:03 UTC](https://meta.discourse.org/t/hosted-discourse-in-5-droplet-not-working-properly/97251/1 "2018-09-15T09:03:29Z")

</div>

Hello  
Installed Droplet in 5$ Droplet of Digital Ocean  
Link is here - forum.bustudymate.in

Everytime it gives Error 502 Bad Gateway

in admin/upgrade it showing error  
now emails arent sending  
showing another warning  
"

## Some problems have been found with your installation of Discourse:

- Sidekiq is not running. Many tasks, like sending emails, are executed asynchronously by sidekiq. Please ensure at least one sidekiq process is running. [Learn about Sidekiq here](https://github.com/mperham/sidekiq).

"

i’m Newbie in VPS field.. know about Shared hosting only.  
is 5$ Droplet is enough to run Discourse smoothly???

---

<div class="post-metadata">

**Author:** ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)\
**Post date:** [2018年九月15日 09:09 UTC](https://meta.discourse.org/t/hosted-discourse-in-5-droplet-not-working-properly/97251/2 "2018-09-15T09:09:52Z")

</div>

Should be, if it’s got a chunk of swap. Try running `./discourse-doctor` (from `/var/discourse`, as `root`) and see what it has to say.

---

<div class="post-metadata">

**Author:** ![Varun\_Deva](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/varun_deva/32/111170_2.png) [@Varun\_Deva](https://meta.discourse.org/u/Varun_Deva)\
**Post date:** [2018年九月15日 09:19 UTC](https://meta.discourse.org/t/hosted-discourse-in-5-droplet-not-working-properly/97251/3 "2018-09-15T09:19:06Z")

</div>

```
when i run rebuild app it gives error 
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake assets:precompile' failed with return #<Process::Status: pid 602 exit 137>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development --retry 3 --jobs 4'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}
c7af0edf4fedeb35ee2e198998af6707bbf9abc3208643c7af86f899435058d8
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one

```

---

<div class="post-metadata">

**Author:** ![Varun\_Deva](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/varun_deva/32/111170_2.png) [@Varun\_Deva](https://meta.discourse.org/u/Varun_Deva)\
**Post date:** [2018年九月15日 09:29 UTC](https://meta.discourse.org/t/hosted-discourse-in-5-droplet-not-working-properly/97251/4 "2018-09-15T09:29:45Z")

</div>

```
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake assets:precompile' failed with return #<Process::Status: pid 602 exit 137>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development --retry 3 --jobs 4'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}
1cbe4230e6ed1caf1584780b74176fce44b1e42a1ead658fdb66f2058cb26c87
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one
==================== END REBUILD LOG ====================
app still not running!

Checking your domain name . . .

Connection to forum.bustudymate.in succeeded.
You should probably remove any non-standard plugins and rebuild.

==================== PLUGINS ====================
          - git clone https://github. com/discourse/docker_manager.git

No non-official plugins detected.

See https:// github. com/discourse/discourse/blob/master/lib/plugin/metadata.rb for the official list.

========================================
Discourse version at forum. bustudymate.in: NOT FOUND
Discourse version at localhost: NOT FOUND

==================== MEMORY INFORMATION ====================
RAM (MB): 1009

              total used free shared buff/cache available
Mem: 985 158 616 0 210 687
Swap: 0 0 0

==================== DISK SPACE CHECK ====================
---------- OS Disk Space ----------
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 25G 4.5G 20G 19% /

==================== DISK INFORMATION ====================
Disk /dev/vda: 25 GiB, 26843545600 bytes, 52428800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: C1F9A1FE-534C-4DAC-9299-5CC180C29DCE

Device Start End Sectors Size Type
/dev/vda1 227328 52428766 52201439 24.9G Linux filesystem
/dev/vda14 2048 10239 8192 4M BIOS boot
/dev/vda15 10240 227327 217088 106M Microsoft basic data

Partition table entries are not in disk order.

==================== END DISK INFORMATION ====================

==================== MAIL TEST ====================
For a robust test, get an address from http:// www. mail-tester. com/
Or just send a test message to yourself.
Email address for mail test? ('n' to skip) [me@example.com]: test-90bnp @mail-tester.com
Sending mail to test-90bnp @mail-tester.com. . . 
Error response from daemon: Container ef942d318fb4808ed54a9837310145b9f172df666be55d294fab8b7d69161646 is not running

Replacing: SMTP_PASSWORD
Replacing: LETSENCRYPT_ACCOUNT_EMAIL
Replacing: DEVELOPER_EMAILS
Replacing: DISCOURSE_DB_PASSWORD
Replacing: Sending mail to

==================== DONE! ====================

You can examine the output of this script with 
LESS=-Ri less /tmp/discourse-debug.txt

BUT FIRST, make sure that you know the first three commands below!!!

Commands to know when viewing the file with the above command (called 'less'): 
q -- quit
/error<ENTER> -- search for the word 'error'
n -- search for the next occurrence
g -- go to the beginning of the file
f -- go forward a page
b -- go back a page
G -- go to the end of the file

```

---

<div class="post-metadata">

**Author:** ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)\
**Post date:** [2018年九月15日 09:38 UTC](https://meta.discourse.org/t/hosted-discourse-in-5-droplet-not-working-properly/97251/5 "2018-09-15T09:38:35Z")

</div>

> [@Varun\_Deva](#):
>
> Mem: 985 158 616 0 210 687  
> Swap: 0 0 0

There’s your problem, you don’t have any swap. If you ran `./discourse-setup`, a swap file should have been created automatically.

---

<div class="post-metadata">

**Author:** ![Varun\_Deva](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/varun_deva/32/111170_2.png) [@Varun\_Deva](https://meta.discourse.org/u/Varun_Deva)\
**Post date:** [2018年九月15日 09:55 UTC](https://meta.discourse.org/t/hosted-discourse-in-5-droplet-not-working-properly/97251/6 "2018-09-15T09:55:10Z")

</div>

It done  
successull  
Now no error messages in dashboard  
emails are not getting for registerd users  
configured correctly.. in test mail it shows successfull  
but in gmail no one get email

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2018年九月15日 10:40 UTC](https://meta.discourse.org/t/hosted-discourse-in-5-droplet-not-working-properly/97251/7 "2018-09-15T10:40:38Z")

</div>

Now it is time to check the logs of you mail service. See [discourse/docs/INSTALL-email.md at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/docs/INSTALL-email.md)
