Code Monkey home page Code Monkey logo

mod_bw's People

Contributors

ivnsoft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mod_bw's Issues

Too little bandwidth

I'm setting up a new server with mod_bw-0.92-2.4.x-x64-vs16 from ApacheHaus on Apache 2.4.51, on Windows Server 2019. I just discovered that with mod_bw enabled, files download very very slowly, far slower than the specified bandwidth. The server has a 10 gig interface. The bandwidth specified is very large (250 MB/sec), as I'm just trying to prevent multiple simultaneous downloads from overwhelming the interface.

Any ideas on the cause? I've tried various values for the packet size and lowered the bandwidth to 250 KB/sec (just took 3 zeros off the end). As the server is not in production yet, my test download was the only active session.

These are my settings:
BandWidthModule On
ForceBandWidthModule On
#Limit overall server bandwidth to 3 Gpbs (which is actually 375 megabytes/sec)
BandWidth all 375000000
MinBandWidth all 0
BandWidthPacket 32768
#Limit large file (more than 10mb) transfers to 2Gbps
LargeFileLimit * 10240 250000000

I saw a post mentioning issues with timing resolution in Windows. Could that be the cause?

Hi, I can complie It on apache 2.4.39

Here is the error, How can fix that?

apxs -i -a -c mod_bw.c
/usr/lib64/apr15u-1/build/libtool --silent --mode=compile gcc -std=gnu99 -prefer-pic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DLINUX -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/httpd -I/usr/include/apr15u-1 -I/usr/include/apr15u-1 -c -o mod_bw.lo mod_bw.c && touch mod_bw.slo
mod_bw.c: In function 'get_bw_rate':
mod_bw.c:567:59: error: 'conn_rec' has no member named 'remote_addr'
if (apr_ipsubnet_test(e[i].x.ip, r->connection->remote_addr)) {
^
mod_bw.c: In function 'get_maxconn':
mod_bw.c:658:59: error: 'conn_rec' has no member named 'remote_addr'
if (apr_ipsubnet_test(e[i].x.ip, r->connection->remote_addr)) {
^
mod_bw.c: In function 'get_sid':
mod_bw.c:709:59: error: 'conn_rec' has no member named 'remote_addr'
if (apr_ipsubnet_test(e[i].x.ip, r->connection->remote_addr)) {
^
apxs:Error: Command failed with rc=65536

bw mod not working on Debian GNU/Linux 11 (bullseye) ?

I'm trying to configure bwmod to work under debian, but no luck.
Here are the current settings:
Debian GNU/Linux 11 (bullseye)
Release: 11
Apache version 2.4.56

instaling ok:
apt-get update
apt-get install libapache2-mod-bw
enable ok:
a2enmod bw

setings under virtual host:

<Location "/">
        SetHandler none
        Order Deny,Allow
        Deny from all
        Allow from 192.168.11.100 
    </Location>

    BandWidthModule On
    ForceBandWidthModule On
    BandWidth all 10240
    MaxConnectionsPerChild 40

checking OK
apachectl configtest
Syntax OK
systemctl restart apache2

After that i have error 403 Forbidden You don't have permission to access this resource.
It is same error on all virtual hosts.
All permisions are OK.
apache error log have no error jus usual notice:

[Wed Jan 17 11:05:59.795948 2024] [mpm_prefork:notice] [pid 2112495] AH00170: caught SIGWINCH, shutting down gracefully
[Wed Jan 17 11:05:59.935236 2024] [:notice] [pid 2112739] mod_bw : Memory Allocated 0 bytes (each conf takes 48 bytes)
[Wed Jan 17 11:05:59.935338 2024] [:notice] [pid 2112739] mod_bw : Version 0.92 - Initialized [0 Confs]
[Wed Jan 17 11:05:59.981591 2024] [mpm_prefork:notice] [pid 2112739] AH00163: Apache/2.4.56 (Debian) mod_fcgid/2.3.9 OpenSSL/1.1.1w mod_perl/2.0.11 Perl/v5.32.1 configured -- resuming normal operations
[Wed Jan 17 11:05:59.981631 2024] [core:notice] [pid 2112739] AH00094: Command line: '/usr/sbin/apache2'

Can you try this kind of setup and make new release which is be working under debian 11?
Or I just doing something wrong ? :)

Output filter invoked twice when using mod_rewrite and mod_xsendfile

When using mod_rewrite to run a PHP script that inserts an X-Sendfile header to be use by the mod_xsendfile module, mod_rewrite is invoked a second time for a subrequest during file path validation. That's fine but the second invocation causes the hook (handle_bw) to add the bandwidth output filter twice. I haven't verified if that actually causes duplicate data on the wire but it causes BW to think there's twice as many connections, causing it to apply limits unnecessarily.

I've got a branch I'll submit soon with a fix, along with the PR. Hopefully that can be incorporated into the new version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.