httpd fastcgi timeout during transfer

2021-04-20 Thread Chris Narkiewicz
Hi,

I have a httpd serving PHP app via FastCGI interface.
This application sends quite large data (1GB) but httpd
timeouts the connection during transfer.

What I found is the following sequence of events:

1) curl https://somehost/download/stuff
2) transfer starts
3) no mention of new conncetion in access.log and error.log
   or stdout/stderr
4) 50-60s last I can see GET request in access.log
5) 60s later connection timeout event occurs
6) curl fails

I tried to trace the source of this issue but I'm not
familiar with httpd code. This is the only place where
timeout is set in fastcgi:

/usr.sbin/httpd/server_fcgi.c:369

bufferevent_settimeout(clt->clt_srvbev,
srv_conf->timeout.tv_sec, srv_conf->timeout.tv_sec);
bufferevent_enable(clt->clt_srvbev, EV_READ|EV_WRITE);
if (clt->clt_toread != 0) {
server_read_httpcontent(clt->clt_bev, clt);
bufferevent_enable(clt->clt_bev, EV_READ);
} else {
bufferevent_disable(clt->clt_bev, EV_READ);
fcgi_add_stdin(clt, NULL);
}

Nothing too suspicious here, but I can't figure out
why it timeouts despite data being actively pumped
through the connection?

Any suggestions welcome. I'm out of ideas.

Cheers,
Chris


signature.asc
Description: PGP signature


MacbookAir7,2 (early-2015) -current SUCCESS + dmesg

2021-04-20 Thread Jan Vlach
Hi openbsd-misc,

I'd like to report install of -current on MacbookAir7,2 (early-2015),
everything works apart from Broadcom wifi (linux sees it as BCM4360 and
ubuntu-based distros have driver/firmware in non-free repo).

- control of display brightness works via xbacklight and I've setup hotkeys in 
i3
  to increase and decreate the brightness by 5%
- keyboard backlight is setup via wsconsctl keyboard.backlight
- APM throttles the CPU at 500MHz-1601MHz
- booting from encrypted softraid, EFI boot partition needs to be set up 
manually,
  partitioning could be MBR and BOOTX64.EFI needs to be copied manually
too.  
- machine runs slightly hot, but fan is silent (at idle)
- using apple USB 100Mbit ethernet adapter, planning on getting ASUS
  nano N10 USB Wi-Fi dongle  later.
- zzz works, using hotplugd to reinitialize network on wake
- changed sd0 serial and MAC address in dmesg down below.

Big thanks!
JV

### DMESG
OpenBSD 6.9 (GENERIC.MP) #473: Mon Apr 19 10:40:28 MDT 2021
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8469352448 (8077MB)
avail mem = 8197283840 (7817MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0x8afbc000 (33 entries)
bios0: vendor Apple Inc. version "426.0.0.0.0" date 12/17/2020
bios0: Apple Inc. MacBookAir7,2
acpi0 at bios0: ACPI 5.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP HPET APIC SBST ECDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT 
SSDT DMAR MCFG
acpi0: wakeup devices PEG0(S3) EC__(S3) HDEF(S3) RP01(S3) RP02(S3) RP03(S4) 
ARPT(S4) RP05(S3) RP06(S3) SPIT(S3) XHC1(S3) ADP1(S3) LID0(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-5250U CPU @ 1.60GHz, 1500.26 MHz, 06-3d-04
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,SRBDS_CTRL,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i5-5250U CPU @ 1.60GHz, 1500.01 MHz, 06-3d-04
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,SRBDS_CTRL,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 40 pins
acpiec0 at acpi0
acpimcfg0 at acpi0
acpimcfg0: addr 0xe000, bus 0-155
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG0)
acpiprt2 at acpi0: bus 1 (RP01)
acpiprt3 at acpi0: bus 2 (RP02)
acpiprt4 at acpi0: bus 3 (RP03)
acpiprt5 at acpi0: bus 5 (RP05)
acpiprt6 at acpi0: bus 4 (RP06)
acpisbs0 at acpi0: SBS0 model "bq20z451" serial 22055 type LION oem "DP"
acpipci0 at acpi0 PCI0: 0x0004 0x0011 0x0001
acpicmos0 at acpi0
asmc0 at acpi0: SMC_ (smc-huronriver) addr 0x300/0x20: rev 2.27f627, 612 keys
"ACPI0008" at acpi0 not configured
"ACPI0001" at acpi0 not configured
"APP000D" at acpi0 not configured
acpiac0 at acpi0: AC unit online
acpibtn0 at acpi0: LID0
acpibtn1 at acpi0: PWRB
abl0 at acpi0: PNLF (backlight)
acpibtn2 at acpi0: SLPB
acpicpu0 at acpi0: C3(200@530 mwait.1@0x60), C2(200@148 mwait.1@0x33), 
C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C3(200@530 mwait.1@0x60), C2(200@148 mwait.1@0x33), 
C1(1000@1 mwait.1), PSS
acpivideo0 at acpi0: IGPU
acpivout0 at acpivideo0: DD01
cpu0: using VERW MDS workaround (except on vmm entry)
cpu0: Enhanced SpeedStep 1500 MHz: speeds: 1601, 1600, 1500, 1400, 1300, 1200, 
1100, 1000, 900, 800, 700, 600, 500 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 5G Host" rev 0x09
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 6000" rev 0x09
drm0 at inteldrm0
inteldrm0: msi, BROADWELL, gen 8
azalia0 at pci0 dev 3 function 0 "Intel Core 5G HD Audio" rev 0x09: msi
azalia0: No codecs found
xhci0 at pci0 dev 20 function 0 "Intel 9 Series xHCI" rev 0x03: msi, xHCI 1.0
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 

Re: default Offset to 1MB boundaries for improved SSD (and Raid Virtual Disk) partition alignment

2021-04-20 Thread Christian Weisgerber
Tom Smyth:

> just installing todays snapshot and the default offset on amd64 is 64,
>  (as it has been for as long as I can remember)

It was changed from 63 in 2010.

> Is it worth while updating the defaults so that OpenBSD partition
> layout will be optimal for SSD or other Virtualized RAID environments
> with 1MB  Chunks,

What are you trying to optimize with this?  FFS2 file systems reserve
64 kB at the start of a partition, and after that it's filesystem
blocks, which are 16/32/64 kB, depending on the size of the filesystem.
I can barely see an argument for aligning large partitions at 128
sectors, but what purpose would larger multiples serve?

> Is there a down side  to moving the default offset to 2048 ?

Not really.  It wastes a bit of space, but that is rather insignificant
for today's disk sizes.

-- 
Christian "naddy" Weisgerber  na...@mips.inka.de



Re: TouchPad, right clicking, and cwm

2021-04-20 Thread tetrahedra

On Sun, Apr 18, 2021 at 11:09:00PM +0200, Ulf Brosziewski wrote:

They are using them.  Which problems do you expect?  The "ClickFinger"
mechanism is the only feature of synaptics(4) that doesn't work properly
because MT data are missing.  Users that prefer synaptics(4) to wsmouse(4)
will turn the "ClickPad" option on, activate "soft-buttons" or tapping, and
that's it.


Okay, so it sounds like the recommended solution is to use either:
a. synaptics(4) with ClickPad and soft-buttons or tapping, or
b. use wsmouse(4)

Did I understand that right? How do people produce right- or 
middle-clicks with a) and tapping? (for trackpads that have no defined 
soft-button areas)


And to configure b), I assume that's just another set of xorg.conf 
configuration lines? or is there additional complexity I'm missing?



As to the default driver in wsmouse(4), it doesn't require any manual
configuration for clickpads, if you you are happy with soft-buttons (tapping
can be enabled).


That sounds good. But unlike some laptops, my clickpad doesn't have any 
defined soft-button areas. Maybe there is a way to define them?




default Offset to 1MB boundaries for improved SSD (and Raid Virtual Disk) partition alignment

2021-04-20 Thread Tom Smyth
Hello,

just installing todays snapshot and the default offset on amd64 is 64,
 (as it has been for as long as I can remember)
Is it worth while updating the defaults so that OpenBSD partition
layout will be optimal for SSD or other Virtualized RAID environments
with 1MB  Chunks,

Is there a down side  to moving the default offset to 2048 ?1MB
off set on 512 byte format disks.
we have been running 2048 offset as our starting offset,  for our
OpenBSD  installs for about 3 -4 years now and we have not come across
issues.

it is unlikely that this will be changed in 6.9  release but It might
be worth re-visiting as it would
make for more straightforward  aligned partitions on OpenBSD installs..

my experience is more for x86 / amd64   rather than other platforms ..

Kindest Regards,

Tom Smyth




-- 
Kindest regards,
Tom Smyth.



Re: How to split (A/B) test landing pages using httpd(8)

2021-04-20 Thread Rafael Possamai
>Does anyone know if it's possible to rotate/alternate between two
>files for the same given request path, using just httpd?

It might be a cleaner implementation if you use relayd(8) to load balance 
requests, there's also relayctl(8) which you could use to gather diagnostics, 
etc.

Personally, I have never attempted this with httpd alone.