Home » U++ Library support » U++ MT-multithreading and servers » httpRequests in secondary non-gui-main Thread (if memory leaks come from http.buffer?)
Re: httpRequests in secondary non-gui-main Thread [message #55367 is a reply to message #55366] |
Tue, 03 November 2020 09:08 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
JeyCi wrote on Tue, 03 November 2020 08:07Klugier wrote on Sat, 31 October 2020 15:02It will show you exactly in which place the leak is.
thank you all for your replies! - I've got the place where it leaks:
it leaks here when httpRequests are being done in secondary thread (not gui-thread) - when using --memory-breakpoint__ [num detected before] - myApp stops here in debug
? can it be connected with OpenSSL, perhaps, as external library is considered to be?
or just the problem of my app_design?..
perhaps, declaring Vector <urls> as thread-local prior to start of thread can help?..
but frankly speaking I intend to consider the error arising just because of switching-context that takes place in MT-environment & not freeing http.buffer... though I added w.http.ClearContent(); in the code...
or perhaps really http.buffer for each request should have thread-local storage-duration?...
p.s.
(btw I'm gathering the Vector of links in the same secondary thread - not transferring it from main thread)
Anyway, thank you, - now I see exact place where it happens
The interesting info you should have sent is the backtrace. The best way is (after it stops on memory breakpoint) Debug / Copy backtrace of all threads.
HttpRequest should not leak (of course, it is always possible there is a bug). Any chance you are doing something like early exit from the thread?
Ah, and maybe the most important: Are you using Upp::Thread? Or are how do you start the thread?
Mirek
[Updated on: Tue, 03 November 2020 09:09] Report message to a moderator
|
|
|
|
|
httpRequests in secondary non-gui-main Thread
By: JeyCi on Fri, 30 October 2020 18:20
|
|
|
Re: httpRequests in secondary non-gui-main Thread
By: Klugier on Sat, 31 October 2020 11:18
|
|
|
Re: httpRequests in secondary non-gui-main Thread
By: JeyCi on Sat, 31 October 2020 11:38
|
|
|
Re: httpRequests in secondary non-gui-main Thread
By: Klugier on Sat, 31 October 2020 15:02
|
|
|
Re: httpRequests in secondary non-gui-main Thread
By: JeyCi on Sat, 31 October 2020 16:01
|
|
|
Re: httpRequests in secondary non-gui-main Thread
By: JeyCi on Sat, 31 October 2020 17:34
|
|
|
Re: httpRequests in secondary non-gui-main Thread
By: JeyCi on Tue, 03 November 2020 08:07
|
|
|
Re: httpRequests in secondary non-gui-main Thread
By: mirek on Tue, 03 November 2020 09:08
|
|
|
Re: httpRequests in secondary non-gui-main Thread
By: JeyCi on Tue, 03 November 2020 13:40
|
|
|
Re: httpRequests in secondary non-gui-main Thread
By: mirek on Tue, 03 November 2020 13:57
|
|
|
Re: httpRequests in secondary non-gui-main Thread
By: JeyCi on Tue, 03 November 2020 15:07
|
|
|
Re: httpRequests in secondary non-gui-main Thread
By: mirek on Tue, 03 November 2020 15:46
|
|
|
Re: httpRequests in secondary non-gui-main Thread
By: JeyCi on Tue, 03 November 2020 18:46
|
|
|
Re: httpRequests in secondary non-gui-main Thread
By: JeyCi on Fri, 06 November 2020 03:57
|
|
|
Re: httpRequests in secondary non-gui-main Thread
By: JeyCi on Fri, 06 November 2020 13:03
|
|
|
Re: httpRequests in secondary non-gui-main Thread
By: mirek on Tue, 03 November 2020 13:59
|
|
|
Re: httpRequests in secondary non-gui-main Thread
By: JeyCi on Mon, 07 December 2020 08:01
|
|
|
Re: httpRequests in secondary non-gui-main Thread
By: mirek on Fri, 11 December 2020 15:48
|
|
|
Re: httpRequests in secondary non-gui-main Thread
By: mirek on Mon, 02 November 2020 11:57
|
Goto Forum:
Current Time: Mon Apr 29 06:53:35 CEST 2024
Total time taken to generate the page: 0.02782 seconds
|