Jump to content

Very slow post adding on forum


Recommended Posts

Posted

Ok, we on 4.4.8 now + rocket loader. Pages loading are pretty good now. But adding post still gets many time. It may be a bit better, but still more then 10 seconds. ;/ We will check elastic one more time (there were some fixes at 4.4.8).

  • Replies 112
  • Created
  • Last Reply
Posted

Ok, I found very similar problem on some polish forum:

https://forum.invisionize.pl/topic/53025-wolne-dodawanie-postów-lub-brak-odświeżenia-strony/?do=findComment&comment=307137

The guy have installed sendgrid and it fixed a problem - posts are added immediately. But there is problem with sendgri. Free plan only offers 100 mails/day. So, we will try to config it properly with standard PHP mail function. How to fix it? Any ideas? 

Posted

We have a topic with 175000 replies and save a new reply is instantaneous.

I had that slow problem and solved it, but I did a lot of optimization at the same time, so I am not exactly sure what solved it.  Yesterday I added elasticsearch and it's even faster, but even bafore that it was a matter of miliseconds.  

My configuration is one dedicated server, and everything on it (apache, database, redis, elasticsearch). I can give the specifics if you are interested. 

 

Posted

Found something more in stats:

other.thumb.png.2248d23acc2a8d83441ab1b4ef2be5d3.png

 

But why this everthing is like Other form few months? We are using newsletter plugin, so I think whole mailing can be sent by it (even notifications), and thats why.

Just now, b416 said:

We have a topic with 175000 replies and save a new reply is instantaneous.

I had that slow problem and solved it, but I did a lot of optimization at the same time, so I am not exactly sure what solved it.  Yesterday I added elasticsearch and it's even faster, but even bafore that it was a matter of miliseconds.  

My configuration is one dedicated server, and everything on it (apache, database, redis, elasticsearch). I can give the specifics if you are interested. 

 

Sure. Im interested. I can show it to my sysadmin. But as I mentioned few times ago:

we have reddis, rocket loader (the whole cloudflare stuff), innodb conversion, 2 servers - one for files, 2nd for db. Of course newest IPS.

I think it can be really connected somehow with this mails notifications. We are using PHP mail () function now.

Posted

So my server : 32Gb RAM, 200Gb SSD on soft raid1

The software (I like keep it up to date 🙂) :

  • Ubuntu 19.10, kernel 5.3.0-23
  • Percona MySQL 8.0.17
  • Apache 2.4.41
  • PHP 7.3.11
  • Redis 5.0.5
  • Elasticsearch 6.8.4 

My database is around 5Gb (some 4 500 000 posts) and the index size around 6Gb. With mysql search I had configured mysql innoDB buffers to 12Gb, but with elasticsearch I downed it to 6Gb and reserved 8Gb for elasticsearch heap. I use redis for all cache, even the undocumented option for guest pages caching. 

9500 registered users, but a few hundreds connected at the same time. 

Posted

We have disabled e-mail notifications on ACP by default now for users. But I have checked it, and it still takes 10 seconds+ to add post at topic. On this moment no one should have receive notification on mail, so somethings still wrong... 😞

Posted
1 minute ago, wegorz23 said:

We have disabled e-mail notifications on ACP by default now for users. 

This is just a default setting. It doesn’t change the users existing subscriptions. 

Posted

edit: 
Ok, I have tested it more. Its more complicated. It looks like if user didn't change this option, then my ACP change impacts him. But if he enabled notifications on email by himself my change on ACP will NOT impact him.

Posted

I have spoken with ma sysadmin. He told me that this is how PHP and function mail() works. If we have many users it will take a while, because PHP make it step by step. He recommended to use rabbitmq for example to send this e-mail with notifications. I wonder, why IPS don't have it by standard? Other big forums like us don't have such problems? They have disabled e-mail notifications or what? We have 7000-8000 mails per day regarding to upper screenshot on normal days without newsletter. 

How it works on this forum? It has even more users then us, and adding posts takes about second for me.

Posted

you can also configure a local postfix, it can handle much bigger volumes without too much resources, and it's free   

you have to configure it all the way (dkim, spf, tls use) or otherwise your mail will end in the user's spambox

 

Posted

You mean smtp method? There were some troubles as far as I remember. We have 70 000 users and sending them newsletter once in few weeks. On PHP mail() it took about 40 hours. SMTP have some limitations as I remember. For example google account have something like 1000 mails per hour or sth like that, and that was problem.

Ok guys, but how about your forums? Are you using PHP or SMTP, or maybe this sendgrid? I don't think that IPS are using Sendgrid here, because its 3rd party. So maybe they have PHP? Adding posts here is very quick.

Posted

yes, smtp method

you can configure the sending rate for postfix, make it send only x mails every y seconds, for example I have this in my config : 
 

default_destination_concurrency_limit  = 2
default_destination_rate_delay         = 5s
default_extra_recipient_limit          = 3

 

Posted

This is most definitely email related, it is one of the common reasons for slow posting, I am surprised it is mentioned just now on page 3 of the topic.

You can setup it with SMTP via Amazon SES - it is relatively cheap, 1$ for 10k emails. I don't have your send volume, but for me there are zero issues with it and 70k for two days should not be a problem at all. 

Posted
17 minutes ago, wegorz23 said:

Thank you. But as I mentioned we need to quicksend of our newsletters - 2 days is max. Can we use it, to send 70 000 users on 2 days?

Of course, if php can do it, postfix can do it, faster and better. I am sure more than 50% of emails on internet are sent by a postfix somewhere in the chain 

Posted
Just now, b416 said:

Of course, if php can do it, postfix can do it, faster and better. I am sure more than 50% of emails on internet are sent by a postfix somewhere in the chain 

Can I use normal gmail account for example? As fair as I remember there were some restrictions of sending per hour. We have our domain audiostereo.pl on some hosting, and when we were trying to send it from example from newsletter@audiostereo.pl it have only 1000 mails/hour or sth like that limited (I don't remember right now).

Posted
3 minutes ago, wegorz23 said:

Can I use normal gmail account for example? As fair as I remember there were some restrictions of sending per hour. We have our domain audiostereo.pl on some hosting, and when we were trying to send it from example from newsletter@audiostereo.pl it have only 1000 mails/hour or sth like that limited (I don't remember right now).

Postfix is your own mail server running on your own server. Nothing to do with gmail. 

Posted
Just now, Chris027 said:

Postfix is your own mail server running on your own server. Nothing to do with gmail. 

Hmmm... but in SMTP configuration I must use some account right? Like on screen:

smtp.png

So I must use gmail, or any other mail account there to work it.

Posted

No, you will use an account from your domain (@audiostereo.pl) and send from localhost (if you install postfix on the same server)

You have to create that account of course, when you configure your server. 

Posted

Ok, I must talk with my sysadmin to check it. Thank you guys.

Just now, b416 said:

You have to create that account of course, when you configure your server. 

Ok, but we have Google Apps for our domain. And @audiostereo.pl was only an alias, and the real domain is @site.pl. So in fact this account is somehow based on Gmail (google apps = gmail).

Posted
3 minutes ago, wegorz23 said:

Ok, I must talk with my sysadmin to check it. Thank you guys.

Ok, but we have Google Apps for our domain. And @audiostereo.pl was only an alias, and the real domain is @site.pl. So in fact this account is somehow based on Gmail (google apps = gmail).

None of that matters for using postfix. 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...