Re: Experience using httpd in production on busy machines?

2021-08-26 Thread Crystal Kolipe
On Thu, Aug 26, 2021 at 11:46:15AM +0200, Stefan Sperling wrote:
> On Thu, Aug 26, 2021 at 06:20:08AM -0300, Crystal Kolipe wrote:
> > On Thu, Aug 26, 2021 at 02:47:40AM +, iio7 wrote:
> > > Any caveats to look out for?
> > 
> > There is an issue with httpd and large file uploads, ( > ~ 600 Mb), which 
> > was introduced sometime after OpenBSD 6.1.
> > 
> > We had a system handling such large file uploads via http, (which is 
> > probably not a typical use case), and it worked fine whilst it was running 
> > OpenBSD 6.1.  When OpenBSD 6.6 was released we did a fresh installation and 
> > found that uploads over about 600 Mb would randomly abort.  Since by this 
> > time the system had fallen into disuse anyway, as far as I know nobody here 
> > bothered to investigate further, but testing now on an OpenBSD 6.9 
> > installation, I can see that the bug still exists.
> > 
> 
> If your test on 6.9 involves a handoff to fcgi (e.g. nextcloud) then
> please try again with a server running -current. There was a related
> bug fixed in May after 6.9 was branched.

A quick test on -current with a very simple CGI handler invoked via
slowcgi showed different behaviour.  It now results in a repeatable
kernel panic after uploading about 1098-1119 Mb.  Smaller uploads work
fine.

As we know that it worked at one point, albeit several years ago, I'll
try to find the commit that broke it.  That might take a while, though.



Re: Experience using httpd in production on busy machines?

2021-08-26 Thread Stefan Sperling
On Thu, Aug 26, 2021 at 06:20:08AM -0300, Crystal Kolipe wrote:
> On Thu, Aug 26, 2021 at 02:47:40AM +, iio7 wrote:
> > Any caveats to look out for?
> 
> There is an issue with httpd and large file uploads, ( > ~ 600 Mb), which was 
> introduced sometime after OpenBSD 6.1.
> 
> We had a system handling such large file uploads via http, (which is probably 
> not a typical use case), and it worked fine whilst it was running OpenBSD 
> 6.1.  When OpenBSD 6.6 was released we did a fresh installation and found 
> that uploads over about 600 Mb would randomly abort.  Since by this time the 
> system had fallen into disuse anyway, as far as I know nobody here bothered 
> to investigate further, but testing now on an OpenBSD 6.9 installation, I can 
> see that the bug still exists.
> 

If your test on 6.9 involves a handoff to fcgi (e.g. nextcloud) then
please try again with a server running -current. There was a related
bug fixed in May after 6.9 was branched.



Re: Experience using httpd in production on busy machines?

2021-08-26 Thread Crystal Kolipe
On Thu, Aug 26, 2021 at 02:47:40AM +, iio7 wrote:
> Any caveats to look out for?

There is an issue with httpd and large file uploads, ( > ~ 600 Mb), which was 
introduced sometime after OpenBSD 6.1.

We had a system handling such large file uploads via http, (which is probably 
not a typical use case), and it worked fine whilst it was running OpenBSD 6.1.  
When OpenBSD 6.6 was released we did a fresh installation and found that 
uploads over about 600 Mb would randomly abort.  Since by this time the system 
had fallen into disuse anyway, as far as I know nobody here bothered to 
investigate further, but testing now on an OpenBSD 6.9 installation, I can see 
that the bug still exists.



Re: Experience using httpd in production on busy machines?

2021-08-26 Thread Jean-Pierre de Villiers
I've never run a site with more than a few hundred users before but if
you need more 'juice' to handle high volume traffic you could always up
the prefork setting.

There are also a few tcp knobs, that you probably shouldn't touch, that
are mentioned in the httpd.conf(5) manual page.  Other than that, just
make sure to keep track of how full your pf(4) state table gets.

Regards,
JP



Experience using httpd in production on busy machines?

2021-08-26 Thread iio7
I am in the process of deploying an updated version of a PHP web application 
that has been running on Apache and Nginx on Linux. This time I have done all 
the development running the webserver on OpenBSD httpd+PHP. The setup is so 
much simpler and I am used to running OpenBSD boxes as gateways/firewall so I 
am familiar.

However, before I take the final step and deploy the new application on OpenBSD 
httpd in production I would like to hear if anyone has any experience to share 
regarding performance compared to running Apache or Nginx on Linux? Any caveats 
to look out for?

Kind regards!

Sent with [ProtonMail](https://protonmail.com/) Secure Email.