Vlad Biley
Vlad Biley
@kelunik, I also regularly come across this warning in my application. It's something in the library. How can I help find the cause? How can I catch the stack trace...
After dropping [some](https://github.com/amphp/http-server/issues/335#issuecomment-1215212864) dependencies (also dropped ev itself, but a bit later), I stopped getting the warning. Will come back if I run into it again.
I found something. ```php use Amp\Http\{Client, Server}; require 'vendor/autoload.php'; $client = Client\HttpClientBuilder::buildDefault(); $request_handler = function (Server\Request $request) use ($client): Server\Response { $headers = [ 'Range' => $request->getHeader('Range'), ]; $request =...
@kelunik, > So you're proxying requests using http-client? Yes. > Do you know whether the leak is inside http-client or the server? As I mentioned in the update above, the...
@trowski, I switched back to v2. So far, I cannot call my software complete and debugged. I decided to focus on that, and when I'm done it will make sense...
I completely switched to v3 but had to replace amphp/http-client with my own implementation over curl_multi (works great in conjunction with amp), and amphp/http-server with own implementation over amphp/socket +...
@kelunik, > curl_multi won't work great in conjunction with Amp, because it has it's own event loop and there can't be two event loops running efficiently at the same time....
Okay, I've been trying it for a few hours now. Everything works well! Of course, more time is needed, but I think it's okay if I close the issue now...
Oh, okay. Are you talking about the server (I guess this, but it's worth clarifying) or the client? And could you please briefly describe the problem?
``` [18-Aug-2022 00:35:25 Europe/Moscow] PHP Fatal error: Uncaught Exception: Fiber stack protect failed: mprotect failed: Cannot allocate memory (12) in vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php:495 Stack trace: #0 vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(495): Fiber->start() #1 vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(549): Revolt\EventLoop\Internal\AbstractDriver->invokeCallbacks() #2...