Discourse in a Docker container

Ok, these commands are great, but still nothing. I add text field to Registration form and column for it to user table. I am not able to see it. I tried to restart docker, restart unicorn with sv, clear assets and precompile them again. And still nothing. I know there must be a way how to do it. Thanks and sorry for noob questions.

I need this “hack” only temporarily, because we need to run this forum ASAP. And it’s buy me some time to do it correct way.

Don’t add it there, use PluginStore and write a plugin, mucking with core table columns is going to end in tears eventually.

Ok, thanks for the warning :slight_smile: I have another question. On our forum we have very high load and our memory is swaping. We have 4GB, but we have on the server also a very visited web. So forum has ± 2GB Ram and we had same server failures caused by low memory. We run with 3 unicorn workers. Should I add more workers or remove one worker? thanks

If you have very high load on the forum (lots of visitors, lots of posts/topics, lots of logged in users) then I recommend running the forum with dedicated resources. It should be OK if you just have lots of anonymous users because of built-in caching.

I am curious, can you provide me the output of http://www.selenic.com/smem/ on your server (you will need to download it).

3 * Unicorns + 1 sidekiq should add up to less than a gig of usage.

Here is free output:

 -----      total          used       free     shared    buffers     cached
Mem:       3499476    2659476     840000          0      16336     315964
-/+ buffers/cache:    2327176    1172300
Swap:     14069752     487864   13581888

And here is smem output:
smem.output.txt (16.0 KB)

And here is the link to forum: http://forum.kingdomcomerpg.com/

1 Like

The output shows usage of unicorns + sidekiq of

. 
                                                       PSS     RSS
24881 warhorse unicorn worker[1] -E produc    40080    96440   112023   144868 
24864 warhorse unicorn worker[0] -E produc    39072   101272   115879   147736 
24910 warhorse unicorn worker[2] -E produc    38828   108672   124858   158348 
17719 warhorse sidekiq 2.15.1 discourse [0    90108   165936   167375   170660 

In particular when you look at the PSS column (which is the only way to get accurate usage for a forked process we see only 500MB or so is used by discourse)

I would recommend

  1. monitoring these numbers when you notice any out of memories
  2. possibly adding another unicorn or 2 if capacity is an issue
  3. explaining what is going on with apache on this server, why is it ever running, is anything it is running causing the runaway memory.

You appear to have plenty of swap space an a reasonable amount of free space (800MB or so)

There is kingdomcomerpg.com wordpress website running on the same server. Both sites forum and homepage has very high traffic. We have 4GB memory, but today we will add 4GB more. We have this dedicated server: http://www.a2hosting.com/flex-dedicated-hosting Leverage settings.

ad 2) As I ask earlier. How can I add more unicorn workers? In unicorn.conf or with ENV and restart docker or how? Thanks.