Hello,

I have a memory issue in which it seems like DRF keeps the objects in 
memory and never releases them. In the below picture I had 140mb starting 
at 1am and then when I went to the view that uses DRF it spiked up to 
1000mb and stayed there for the rest of the night until the morning at 9am 
where I went again and it spiked even more.

<https://lh3.googleusercontent.com/-TqM8Or-S8Ek/WByrCDFaYOI/AAAAAAAAAM4/0048yqz6HWsY7-bXfKoS3vTcKytijoytACLcB/s1600/Screen%2BShot%2B2016-11-04%2Bat%2B11.35.56%2BAM.png>









class SVGView(viewsets.ReadOnlyModelViewSet):
    serializer_class = SVGSerializer
    queryset = SVG.objects.all()
    filter_fields = ('name',)


class SteelWView(viewsets.ReadOnlyModelViewSet):
    serializer_class = SteelWSerializer
    queryset = SteelW.objects.all()


class SteelSView(viewsets.ReadOnlyModelViewSet):
    serializer_class = SteelSSerializer
    queryset = SteelS.objects.all()


All three of those views above are used on this one page and combined there are 
about 250-300 rows it pulls from the database. How can I go about fixing this? 
I know about caching but I don't want to do that just yet. Also, shouldn't the 
memory be freed up at some point? Any thoughts?

Thanks,
Alex

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to