can you suggest us any topics that can help us?
we have turned on rate limiting template all of our users were encountering 429
Then we turn off Cloudflare template after that we cannot access discourse with local IP. Can you tell us how to whitelist IP in discourse?
16 GB / 8 vCPUs with ssd’s , Intel Dedicated Digital Ocean Droplet
table_name | row_estimate | table_size | index_size | total_size
-----------------------------------------------------------------------------------
topic_views | 7638895 | 339 MB | 704 MB | 1044 MB
post_search_data | 95984 | 493 MB | 117 MB | 610 MB
posts | 115690 | 512 MB | 32 MB | 544 MB
post_revisions | 18876 | 368 MB | 1512 kB | 370 MB
top_topics | 74384 | 70 MB | 209 MB | 279 MB
incoming_links | 1194305 | 72 MB | 75 MB | 147 MB
topic_links | 248176 | 46 MB | 54 MB | 101 MB
stylesheet_cache | 1819 | 94 MB | 352 kB | 95 MB
user_histories | 38564 | 83 MB | 6376 kB | 90 MB
topics | 88662 | 49 MB | 37 MB | 85 MB
notifications | 144259 | 39 MB | 26 MB | 65 MB
topic_search_data | 77107 | 47 MB | 16 MB | 63 MB
user_profile_views | 298745 | 30 MB | 27 MB | 57 MB
scheduler_stats | 247499 | 38 MB | 6736 kB | 44 MB
topic_users | 199664 | 28 MB | 14 MB | 42 MB
user_actions | 113450 | 15 MB | 23 MB | 38 MB
topic_tags | 293483 | 20 MB | 13 MB | 33 MB
search_logs | 172445 | 24 MB | 8752 kB | 33 MB
post_timings | 179627 | 15 MB | 8568 kB | 24 MB
post_stats | 105481 | 13 MB | 5104 kB | 18 MB
reviewables | 4737 | 15 MB | 1184 kB | 17 MB
optimized_images | 50814 | 12 MB | 4704 kB | 16 MB
user_auth_token_logs | 42998 | 12 MB | 1904 kB | 14 MB
incoming_referers | 26867 | 4520 kB | 4592 kB | 9112 kB
directory_items | 33456 | 2928 kB | 5488 kB | 8416 kB
draft_sequences | 38948 | 5144 kB | 2448 kB | 7592 kB
user_associated_accounts | 2237 | 6728 kB | 448 kB | 7176 kB
user_custom_fields | 27921 | 2768 kB | 3568 kB | 6336 kB
reviewable_histories | 8538 | 5784 kB | 528 kB | 6312 kB
user_visits | 27147 | 1552 kB | 2656 kB | 4208 kB
uploads | 5623 | 1560 kB | 2128 kB | 3688 kB
users | 5633 | 1720 kB | 1744 kB | 3464 kB
topic_link_clicks | 16494 | 2088 kB | 768 kB | 2856 kB
email_logs | 5057 | 1128 kB | 1568 kB | 2696 kB
web_crawler_requests | 5533 | 848 kB | 1632 kB | 2480 kB
topic_allowed_users | 14487 | 976 kB | 1128 kB | 2104 kB
category_tag_stats | 11176 | 736 kB | 1192 kB | 1928 kB
drafts | 219 | 1712 kB | 32 kB | 1744 kB
category_users | 10579 | 544 kB | 1120 kB | 1664 kB
user_badges | 7852 | 768 kB | 888 kB | 1656 kB
email_tokens | 6175 | 800 kB | 832 kB | 1632 kB
tag_search_data | 6860 | 736 kB | 808 kB | 1544 kB
group_users | 9277 | 808 kB | 696 kB | 1504 kB
user_profiles | 5629 | 968 kB | 472 kB | 1440 kB
user_search_data | 5633 | 712 kB | 704 kB | 1416 kB
user_emails | 5117 | 504 kB | 760 kB | 1264 kB
tags | 7121 | 592 kB | 640 kB | 1232 kB
plugin_store_rows | 4103 | 864 kB | 360 kB | 1224 kB
user_stats | 5631 | 1064 kB | 144 kB | 1208 kB
unsubscribe_keys | 2190 | 528 kB | 520 kB | 1048 kB
reviewable_scores | 4540 | 704 kB | 320 kB | 1024 kB
user_options | 5469 | 880 kB | 144 kB | 1024 kB
user_avatars | 5346 | 392 kB | 456 kB | 848 kB
incoming_domains | 4985 | 408 kB | 432 kB | 840 kB
post_uploads | 3194 | 264 kB | 568 kB | 832 kB
post_custom_fields | 2804 | 376 kB | 432 kB | 808 kB
topic_thumbnails | 3014 | 248 kB | 536 kB | 784 kB
user_uploads | 5549 | 328 kB | 432 kB | 760 kB
user_auth_tokens | 1382 | 416 kB | 336 kB | 752 kB
topic_custom_fields | 1058 | 352 kB | 240 kB | 592 kB
application_requests | 5401 | 280 kB | 272 kB | 552 kB
topic_allowed_groups | 3116 | 176 kB | 264 kB | 440 kB
quoted_posts | 2142 | 168 kB | 240 kB | 408 kB
theme_fields | 23 | 328 kB | 32 kB | 360 kB
post_actions | 1057 | 112 kB | 224 kB | 336 kB
watched_words | 1946 | 168 kB | 144 kB | 312 kB
javascript_caches | 11 | 248 kB | 64 kB | 312 kB
schema_migration_details | 1218 | 200 kB | 104 kB | 304 kB
dismissed_topic_users | 463 | 104 kB | 160 kB | 264 kB
discourse_voting_topic_vote_count | 1407 | 120 kB | 96 kB | 216 kB
category_featured_topics | 409 | 64 kB | 120 kB | 184 kB
categories | 73 | 72 kB | 112 kB | 184 kB
post_replies | 916 | 88 kB | 80 kB | 168 kB
group_histories | 498 | 56 kB | 112 kB | 168 kB
site_settings | 255 | 112 kB | 48 kB | 160 kB
bookmarks | 179 | 24 kB | 112 kB | 136 kB
user_security_keys | 3 | 16 kB | 112 kB | 128 kB
skipped_email_logs | 296 | 48 kB | 80 kB | 128 kB
category_custom_fields | 513 | 56 kB | 72 kB | 128 kB
groups | 10 | 80 kB | 48 kB | 128 kB
schema_migrations | 1217 | 64 kB | 56 kB | 120 kB
assignments | 98 | 56 kB | 48 kB | 104 kB
user_archived_messages | 637 | 40 kB | 64 kB | 104 kB
given_daily_likes | 569 | 32 kB | 64 kB | 96 kB
invites | 21 | 16 kB | 80 kB | 96 kB
do_not_disturb_timings | 0 | 8192 bytes | 80 kB | 88 kB
sitemaps | 9 | 48 kB | 32 kB | 80 kB
badges | 52 | 32 kB | 48 kB | 80 kB
user_api_keys | 1 | 16 kB | 64 kB | 80 kB
incoming_emails | 0 | 8192 bytes | 64 kB | 72 kB
user_second_factors | 21 | 16 kB | 48 kB | 64 kB
email_change_requests | 2 | 16 kB | 48 kB | 64 kB
screened_ip_addresses | 5 | 16 kB | 48 kB | 64 kB
api_keys | 4 | 16 kB | 48 kB | 64 kB
backup_metadata | 6 | 48 kB | 16 kB | 64 kB
child_themes | 4 | 8192 bytes | 48 kB | 56 kB
tag_users | 59 | 8192 bytes | 48 kB | 56 kB
invited_users | 4 | 8192 bytes | 48 kB | 56 kB
group_mentions | 6 | 8192 bytes | 48 kB | 56 kB
tag_group_permissions | 1 | 8192 bytes | 48 kB | 56 kB
category_search_data | 73 | 16 kB | 40 kB | 56 kB
anonymous_users | 102 | 8192 bytes | 48 kB | 56 kB
topic_invites | 6 | 8192 bytes | 48 kB | 56 kB
user_notification_schedules | 8 | 8192 bytes | 48 kB | 56 kB
directory_columns | 8 | 16 kB | 32 kB | 48 kB
themes | 6 | 16 kB | 32 kB | 48 kB
external_upload_stubs | 0 | 8192 bytes | 40 kB | 48 kB
api_key_scopes | 6 | 16 kB | 32 kB | 48 kB
badge_types | 3 | 16 kB | 32 kB | 48 kB
color_scheme_colors | 20 | 16 kB | 32 kB | 48 kB
onceoff_logs | 40 | 16 kB | 32 kB | 48 kB
permalinks | 24 | 16 kB | 32 kB | 48 kB
theme_modifier_sets | 6 | 16 kB | 32 kB | 48 kB
topic_timers | 3 | 8192 bytes | 40 kB | 48 kB
user_api_key_scopes | 2 | 16 kB | 32 kB | 48 kB
group_category_notification_defaults | 1 | 8192 bytes | 32 kB | 40 kB
group_requests | 0 | 8192 bytes | 32 kB | 40 kB
category_groups | 4 | 8192 bytes | 32 kB | 40 kB
tag_group_memberships | 7 | 8192 bytes | 32 kB | 40 kB
invited_groups | 1 | 8192 bytes | 32 kB | 40 kB
topic_groups | 47 | 8192 bytes | 32 kB | 40 kB
discourse_voting_votes | 4 | 8192 bytes | 32 kB | 40 kB
theme_translation_overrides | 0 | 8192 bytes | 24 kB | 32 kB
oauth2_user_infos | 0 | 8192 bytes | 24 kB | 32 kB
screened_urls | 0 | 8192 bytes | 24 kB | 32 kB
screened_emails | 0 | 8192 bytes | 24 kB | 32 kB
remote_themes | 3 | 16 kB | 16 kB | 32 kB
tag_groups | 1 | 16 kB | 16 kB | 32 kB
push_subscriptions | 13 | 16 kB | 16 kB | 32 kB
published_pages | 0 | 8192 bytes | 24 kB | 32 kB
theme_settings | 9 | 16 kB | 16 kB | 32 kB
imap_sync_logs | 0 | 8192 bytes | 24 kB | 32 kB
poll_options | 0 | 8192 bytes | 24 kB | 32 kB
embeddable_hosts | 0 | 16 kB | 16 kB | 32 kB
color_schemes | 2 | 16 kB | 16 kB | 32 kB
user_exports | 1 | 16 kB | 16 kB | 32 kB
user_field_options | 4 | 16 kB | 16 kB | 32 kB
user_fields | 7 | 16 kB | 16 kB | 32 kB
badge_groupings | 5 | 16 kB | 16 kB | 32 kB
backup_draft_posts | 0 | 8192 bytes | 24 kB | 32 kB
ar_internal_metadata | 1 | 16 kB | 16 kB | 32 kB
polls | 0 | 8192 bytes | 24 kB | 32 kB
poll_votes | 0 | 0 bytes | 32 kB | 32 kB
web_hook_event_types | 13 | 16 kB | 16 kB | 32 kB
single_sign_on_records | 0 | 8192 bytes | 24 kB | 32 kB
group_custom_fields | 0 | 8192 bytes | 16 kB | 24 kB
allowed_pm_users | 0 | 0 bytes | 24 kB | 24 kB
user_warnings | 0 | 0 bytes | 24 kB | 24 kB
user_ip_address_histories | 0 | 8192 bytes | 16 kB | 24 kB
user_open_ids | 0 | 8192 bytes | 16 kB | 24 kB
muted_users | 0 | 0 bytes | 24 kB | 24 kB
topic_embeds | 0 | 8192 bytes | 16 kB | 24 kB
post_action_types | 7 | 8192 bytes | 16 kB | 24 kB
message_bus | 0 | 8192 bytes | 16 kB | 24 kB
linked_topics | 0 | 0 bytes | 24 kB | 24 kB
post_details | 0 | 8192 bytes | 16 kB | 24 kB
ignored_users | 0 | 0 bytes | 24 kB | 24 kB
web_hook_events | 0 | 8192 bytes | 16 kB | 24 kB
translation_overrides | 0 | 8192 bytes | 16 kB | 24 kB
backup_draft_topics | 0 | 0 bytes | 24 kB | 24 kB
post_reply_keys | 0 | 0 bytes | 24 kB | 24 kB
custom_emojis | 0 | 8192 bytes | 16 kB | 24 kB
category_tags | 0 | 0 bytes | 24 kB | 24 kB
shared_drafts | 0 | 0 bytes | 24 kB | 24 kB
category_tag_groups | 0 | 0 bytes | 16 kB | 16 kB
group_archived_messages | 0 | 0 bytes | 16 kB | 16 kB
discourse_voting_category_settings | 0 | 0 bytes | 16 kB | 16 kB
developers | 0 | 0 bytes | 16 kB | 16 kB
web_hooks | 0 | 8192 bytes | 8192 bytes | 16 kB
shelved_notifications | 0 | 0 bytes | 16 kB | 16 kB
group_tag_notification_defaults | 0 | 0 bytes | 16 kB | 16 kB
reviewable_claimed_topics | 0 | 0 bytes | 16 kB | 16 kB
groups_web_hooks | 0 | 0 bytes | 8192 bytes | 8192 bytes
tags_web_hooks | 0 | 0 bytes | 8192 bytes | 8192 bytes
categories_web_hooks | 0 | 0 bytes | 8192 bytes | 8192 bytes
web_hook_event_types_hooks | 0 | 0 bytes | 8192 bytes | 8192 bytes
badge_posts | 0 | 0 bytes | 0 bytes | 0 bytes
we have changed some settings in app.yml
db_shared_buffers: “4096MB”
db_work_mem: “400MB”
UNICORN_WORKERS: 16
## this is the all-in-one, standalone Discourse Docker container template
##
## After making changes to this file, you MUST rebuild
## /var/discourse/launcher rebuild app
##
## BE *VERY* CAREFUL WHEN EDITING!
## YAML FILES ARE SUPER SUPER SENSITIVE TO MISTAKES IN WHITESPACE OR ALIGNMENT!
## visit http://www.yamllint.com/ to validate this file as needed
templates:
- "templates/postgres.template.yml"
- "templates/redis.template.yml"
- "templates/web.template.yml"
# - "templates/sshd.template.yml"
#- "templates/web.ratelimited.template.yml" #removed this to avoid 429 too many requests errors https://meta.discourse.org/t/remove-the-ip-limits/185829
- "templates/cloudflare.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
#- "templates/web.ssl.template.yml"
#- "templates/web.letsencrypt.ssl.template.yml"
## which TCP/IP ports should this container expose?
## If you want Discourse to share a port with another webserver like Apache or nginx,
## see https://meta.discourse.org/t/17247 for details
expose:
- "1010:80" # http
# - "443:443" # https
params:
db_default_text_search_config: "pg_catalog.english"
## Set db_shared_buffers to a max of 25% of the total memory.
## will be set automatically by bootstrap based on detected RAM, or you can override
db_shared_buffers: "4096MB"
## can improve sorting performance, but adds memory usage per-connection
db_work_mem: "400MB"
## Which Git revision should this container use? (default: tests-passed)
#version: tests-passed
env:
LANG: en_US.UTF-8
# DISCOURSE_DEFAULT_LOCALE: en
## How many concurrent web requests are supported? Depends on memory and CPU cores.
## will be set automatically by bootstrap based on detected CPUs, or you can override
UNICORN_WORKERS: 16
## TODO: The domain name this Discourse instance will respond to
## Required. Discourse will not work with a bare IP number.
DISCOURSE_HOSTNAME: "howtodiscuss.com"
## Uncomment if you want the container to be started with the same
## hostname (-h option) as specified above (default "$hostname-$config")
#DOCKER_USE_HOSTNAME: true
## TODO: List of comma delimited emails that will be made admin and developer
## on initial signup example 'user1@example.com,user2@example.com'
DISCOURSE_DEVELOPER_EMAILS: "smtp_username"
## TODO: The SMTP mail server used to validate new accounts and send notifications
# SMTP ADDRESS, username, and password are required
# WARNING the char '#' in SMTP password can cause problems!
DISCOURSE_SMTP_ADDRESS: smtp.example.com
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: admin@example.com
DISCOURSE_SMTP_PASSWORD: p@$$word
#DISCOURSE_SMTP_DOMAIN: discourse.example.com # (required by some providers)
#DISCOURSE_NOTIFICATION_EMAIL: nobody@discourse.example.com # (address to send notifications from)
#DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
#LETSENCRYPT_ACCOUNT_EMAIL: me@example.com
#DISCOURSE_MAXMIND_LICENSE_KEY: 1234567890123456
## The http or https CDN address for this Discourse instance (configured to pull)
## see https://meta.discourse.org/t/14857 for details
#DISCOURSE_CDN_URL: https://discourse-cdn.example.com
## The Docker container is stateless; all data is stored in /shared
volumes:
- volume:
host: /var/discourse/shared/standalone
guest: /shared
- volume:
host: /var/discourse/shared/standalone/log/var-log
guest: /var/log
## Plugins go here
## see https://meta.discourse.org/t/19157 for details
hooks:
after_code:
- exec:
cd: $home/plugins
cmd:
- git clone https://github.com/discourse/docker_manager.git
- git clone https://github.com/discourse/discourse-sitemap.git
#- git clone https://github.com/discourse/discourse-math.git # custom plugin for math JAX support
- git clone https://github.com/discourse/discourse-solved.git # custom plugin for question and answers and choosing best answer
#- git clone https://github.com/discourse/discourse-voting.git # custom plugin for voting on topics only
#- git clone https://github.com/discourse/discourse-yearly-review.git # custom plugin for automatically posting a yearly topic of forum activity
- git clone https://github.com/discourse/discourse-user-notes.git # custom plugin to allow staff to add notes about a user
- git clone https://github.com/paviliondev/discourse-question-answer.git # custom non official plugin for SO style QnA voting on posts
- git clone https://github.com/discourse/discourse-adplugin.git # custom official plugin for ads
#- git clone https://github.com/discourse/discourse-whos-online.git # custom plugin to see who is online
- git clone https://github.com/paviliondev/discourse-topic-previews.git # custom plugin for showing topics previews nicely
#- git clone https://github.com/paviliondev/discourse-ratings.git # custom plugin to allow user rating on topics
#- git clone https://github.com/discourse/discourse-cakeday.git # official plugin for birthdays and join date celebrations
#- git clone https://github.com/discourse/discourse-saved-searches.git # official plugin for saved search notifications
#- git clone https://github.com/paviliondev/discourse-follow.git # custom plugin to allow users to follow each other
- git clone https://github.com/discourse/discourse-assign.git # custom for assigning topics to staff
- git clone https://github.com/paviliondev/x-discourse-tlp-thumbnail.git # custom plugin for showing thumbnails from CDN images
- git clone https://github.com/discourse/discourse-prometheus.git # custom plugin for slow speed monitoring
- git clone https://github.com/discourse/discourse-push-notifications.git # plugin for push notifications
## Any custom commands to run after building
run:
- exec: echo "Beginning of custom commands"
## If you want to set the 'From' email address for your first registration, uncomment and change:
## After getting the first signup email, re-comment the line. It only needs to run once.
- exec: rails r "SiteSetting.notification_email='noreply@howtodiscuss.com'"
- exec: echo "End of custom commands"
## to show real IPs https://meta.discourse.org/t/troubleshooting-a-429-rate-limit/81060/19
# This is the magic to get IP numbers transmitted to Discourse
# See https://meta.discourse.org/t/last-ip-address-and-action-dispatch-trusted-proxies/50098/3?u=pfaffman
- replace:
filename: /etc/nginx/conf.d/discourse.conf
from: "types {"
to: |
set_real_ip_from 172.17.0.0/24;
real_ip_header X-Forwarded-For;
real_ip_recursive on;
types {

