Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
f7613819
Commit
f7613819
authored
Jul 18, 2017
by
Eric Fischer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ActiveBulkThread record logging; CMS memory leak debug
parent
b4c2b561
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletions
+14
-1
common/lib/xmodule/xmodule/modulestore/__init__.py
+14
-1
No files found.
common/lib/xmodule/xmodule/modulestore/__init__.py
View file @
f7613819
...
...
@@ -7,6 +7,7 @@ import logging
import
re
import
json
import
datetime
import
traceback
from
pytz
import
UTC
from
collections
import
defaultdict
...
...
@@ -157,7 +158,19 @@ class ActiveBulkThread(threading.local):
"""
def
__init__
(
self
,
bulk_ops_record_type
,
**
kwargs
):
super
(
ActiveBulkThread
,
self
)
.
__init__
(
**
kwargs
)
self
.
records
=
defaultdict
(
bulk_ops_record_type
)
self
.
_records
=
defaultdict
(
bulk_ops_record_type
)
self
.
CMS_LEAK_DEBUG_GLOBAL
=
True
# only log once per process
@property
def
records
(
self
):
if
self
.
CMS_LEAK_DEBUG_GLOBAL
and
len
(
self
.
_records
)
>
2000
:
# arbitrary limit, we peak around ~2750 on edx.org
log
.
info
(
"EDUCATOR-768: The memory leak issue may be in progress. How we got here:
\n
{}"
.
format
(
""
.
join
(
traceback
.
format_stack
())
)
)
self
.
CMS_LEAK_DEBUG_GLOBAL
=
False
return
self
.
_records
class
BulkOperationsMixin
(
object
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment