diff --git a/lib/Consumer/ForkCurl.php b/lib/Consumer/ForkCurl.php index 5a16779..dee0b1e 100644 --- a/lib/Consumer/ForkCurl.php +++ b/lib/Consumer/ForkCurl.php @@ -74,10 +74,10 @@ public function flushBatch($messages) $cmd .= " '" . $url . "'"; - // Verify message size is below than 32KB - if (strlen($payload) >= 32 * 1024) { + // Verify message size is below than 5MB + if (strlen($payload) >= 5 * 1024 * 1024) { if ($this->debug()) { - $msg = "Message size is larger than 32KB"; + $msg = "Message size is larger than 5MB"; error_log("[PostHog][" . $this->type . "] " . $msg); } diff --git a/lib/Consumer/LibCurl.php b/lib/Consumer/LibCurl.php index 973e960..7600843 100644 --- a/lib/Consumer/LibCurl.php +++ b/lib/Consumer/LibCurl.php @@ -56,10 +56,10 @@ public function flushBatch($messages) $body = $this->payload($messages); $payload = json_encode($body); - // Verify message size is below than 32KB - if (strlen($payload) >= 32 * 1024) { + // Verify message size is below than 5MB + if (strlen($payload) >= 5 * 1024 * 1024) { if ($this->debug()) { - $msg = "Message size is larger than 32KB"; + $msg = "Message size is larger than 5MB"; error_log("[PostHog][" . $this->type . "] " . $msg); } diff --git a/lib/Consumer/Socket.php b/lib/Consumer/Socket.php index 11e11c5..b7f56a4 100644 --- a/lib/Consumer/Socket.php +++ b/lib/Consumer/Socket.php @@ -200,10 +200,10 @@ private function createBody($host, $content) $req .= "\r\n"; $req .= $content; - // Verify message size is below than 32KB - if (strlen($req) >= 32 * 1024) { + // Verify message size is below than 5MB + if (strlen($req) >= 5 * 1024 * 1024) { if ($this->debug()) { - $msg = "Message size is larger than 32KB"; + $msg = "Message size is larger than 5MB"; error_log("[PostHog][" . $this->type . "] " . $msg); }