Thanks. FYI, I created a ticket: https://code.djangoproject.com/ticket/29878

On Friday, October 19, 2018 at 7:51:06 PM UTC-4, Tim Graham wrote:
>
> Yes, if you can demonstrate that Django is at fault, you may create a 
> ticket.
>
> If you're unsure, you might have better luck on the 
> https://groups.google.com/forum/#!forum/geodjango mailing list.
>
> On Thursday, October 18, 2018 at 9:08:10 PM UTC-4, Yong Li wrote:
>>
>> I have seen consistent GEOSContextHandle leak when a thread using GEOS 
>> exits. The source code is in django/contrib/gis/geos.
>>
>> I can get rid of the leak by clearing all attributes of io.thread_context 
>> before exiting that thread.
>>
>> It seems to me that the root cause is the destructors of thread local 
>> objects in io.thread_context call GEOS functions, so they need the 
>> GEOSContextHandle. If threadsafe.thread_context has been cleared by Python 
>> engine, they will create another one.
>>
>> Assume Python clears threading.local objects in this order:
>>
>> 1. thread_safe.thread_context
>> 2. io.thread_context
>>
>> When doing the second step above, it creates another GEOScontextHandle 
>> and saves to thread_safe.thread_context.handle. And this is never cleared 
>> again.
>>
>> This is just my thought. Should a Django ticket be created for this?
>>
>>
>> Best regards,
>> Yong Li
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1d0b8df3-f50a-496a-ae63-d3254f0c6b0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to