memory leak issue

Hi All,

I seem to be running into a memory issue after leaving my live streaming app on for a number of hours. Any ideas? Here is my code.

class LiveGrapher: #Observer

def __init__(self, observable):
    self.datasetsDisplayed = observable.registerObserver(self)
    self.source = {}
    self.colors = ['grey', 'yellow', 'LightSkyBlue', 'red', 'green', 'blue','AliceBlue', 'AniqueWhite', 'Aqua', 'Aquamarine', 'Azure', 'Beige', 'Bisque']
    for item in self.datasetsDisplayed:
        self.source[item] = ColumnDataSource(data=dict(x=[], y=[], dateStampStr = [], timeStampStr = [], key = []))
       
    self.doc = curdoc()  

def notify(self, observable, *args, **kwargs):
    timeStamp = ''
    YKey = ''
    YVal = 0
    timeStamp = kwargs['timeStamp'] - datetime.timedelta(hours=5)
    for key in kwargs.keys():
        if key in self.datasetsDisplayed:
           YVal = kwargs[key]
           self.doc.add_next_tick_callback(partial(self.update, x=timeStamp, y=YVal, key =key))
          
   

def update(self, x, y, key):
    self.source[key].stream(dict(x=[x], y=[y], key = [key], dateStampStr=[x.strftime('%m/%d/%Y')], timeStampStr=[x.strftime('%H:%M:%S')]), 30)

def draw(self):
    drawTools = [BoxZoomTool(), ResetTool(), HoverTool( tooltips=[('key', '@key'), ('date', '@dateStampStr'), ('time', '@timeStampStr'), ('value' , '@y')])]
    now = datetime.datetime.now()
    #hourandMinute = now.strftime("%H:%M")
    #titlef = "DLHV Live Analysis for the past 1 Hour" %hourandMinute
   
    p = figure(title="DLHV Live Analysis for the past 1 Hour", x_axis_type="datetime", x_axis_label='Time', y_axis_label = 'Value',y_range=[0,2000], tools=drawTools, plot_width=1000)
   
    colorID = 0
    for dataset in self.datasetsDisplayed:
        p.line(x='x', y='y', legend = dataset, source=self.source[dataset], line_color=self.colors[colorID])
        #p.square(x='x', y='y', legend= dataset, source=self.source[dataset], fill_color=None, line_color=self.colors[colorID])
        colorID = colorID + 1
    p.legend.location = "top_right"
    p.legend.background_fill_color = "grey"
    p.legend.background_fill_alpha = 0.5
   

    self.doc.add_root(p)

#ecuAddress = raw_input(“Please enter ECU Address:”)
dlhvMonitor1 = DlhvMonitor(‘10.215.21.136’)
lg1 = LiveGrapher(dlhvMonitor1)
lg1.draw()

thread = Thread(target = dlhvMonitor1.startDataRetrieval)
thread.start()

and here is the log:

lambda future: self.add_callback(callback, future))

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 962, in add_callback

stack_context.wrap(callback), *args, **kwargs))

MemoryError

2017-01-21
09:42:06,334 Exception in callback <functools.partial object at
0x7889E340>

Traceback
(most recent call last):

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 619, in _run_callback

self.add_future(ret, lambda f: f.result())

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 596, in add_future

lambda future: self.add_callback(callback, future))

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\concurrent.py”,
line 265, in add_done_callback

fn(self)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 596, in

lambda future: self.add_callback(callback, future))

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 962, in add_callback

stack_context.wrap(callback), *args, **kwargs))

MemoryError

2017-01-21
09:44:11,214 Uncaught exception GET
/liveGrapher/ws?bokeh-protocol-version=1.0&bokeh-session-id=77vu529pcuD3g2mE3fnhAN6Z2o3zqlDkxgEtzZSKyG

s
(::1)

HTTPServerRequest(protocol=‘http’,
host=‘localhost:5006’, method=‘GET’,
uri=’/liveGrapher/ws?bokeh-protocol-version=1.0&bokeh-session-id=77vu529pcuD3

2mE3fnhAN6Z2o3zqlDkxgEtzZSKyGZs’,
version=‘HTTP/1.1’, remote_ip=’::1’, headers={‘Origin’:
http://localhost:5006’, ‘Upgrade’: ‘websocket’, 'Accept-La

guage’:
‘en-US,en;q=0.8’, ‘Accept-Encoding’: ‘gzip, deflate, sdch, br’,
‘Sec-Websocket-Version’: ‘13’, ‘Host’: ‘localhost:5006’, ‘Sec-Websocket-Key’:

‘VdOVoDLpWbJPKT+DeFXb1Q==’,
‘User-Agent’: 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/55.0.2883.87 Safari/537.

6’,
‘Connection’: ‘Upgrade’, ‘Pragma’: ‘no-cache’, ‘Cache-Control’: ‘no-cache’,
‘Sec-Websocket-Extensions’: 'permessage-deflate; client_max_window_bi

s’})

Traceback
(most recent call last):

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\web.py”,
line 1425, in _stack_context_handle_exception

raise_exc_info((type, value, traceback))

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\stack_context.py”,
line 314, in wrapped

ret = fn(*args, **kwargs)

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\websocket.py”,
line 741, in _on_frame_length_16

self.stream.read_bytes(4, self._on_masking_key)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”,
line 317, in read_bytes

self._try_inline_read()

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”,
line 699, in _try_inline_read

self._read_from_buffer(pos)

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”,
line 770, in _read_from_buffer

self._run_read_callback(pos, False)

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”,
line 682, in _run_read_callback

self._run_callback(callback, self._consume(size))

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”,
line 583, in _run_callback

self.io_loop.add_callback(wrapper)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 962, in add_callback

stack_context.wrap(callback), *args, **kwargs))

MemoryError

2017-01-21
09:44:11,838 Exception in callback <functools.partial object at
0x66B87720>

Traceback
(most recent call last):

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 619, in _run_callback

self.add_future(ret, lambda f: f.result())

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 596, in add_future

lambda future: self.add_callback(callback, future))

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\concurrent.py”,
line 265, in add_done_callback

fn(self)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 596, in

lambda future: self.add_callback(callback, future))

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 962, in add_callback

stack_context.wrap(callback), *args, **kwargs))

MemoryError

The Memory issue is with Python (not the browser)

···

On Monday, 23 January 2017 14:41:54 UTC, Eugene Cheung wrote:

lambda future: self.add_callback(callback, future))

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 962, in add_callback

stack_context.wrap(callback), *args, **kwargs))

MemoryError

2017-01-21
09:42:06,334 Exception in callback <functools.partial object at
0x7889E340>

Traceback
(most recent call last):

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 619, in _run_callback

self.add_future(ret, lambda f: f.result())

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 596, in add_future

lambda future: self.add_callback(callback, future))

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\concurrent.py”,
line 265, in add_done_callback

fn(self)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 596, in

lambda future: self.add_callback(callback, future))

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 962, in add_callback

stack_context.wrap(callback), *args, **kwargs))

MemoryError

2017-01-21
09:44:11,214 Uncaught exception GET
/liveGrapher/ws?bokeh-protocol-version=1.0&bokeh-session-id=77vu529pcuD3g2mE3fnhAN6Z2o3zqlDkxgEtzZSKyG

s
(::1)

HTTPServerRequest(protocol=‘http’,
host=‘localhost:5006’, method=‘GET’,
uri='/liveGrapher/ws?bokeh-protocol-version=1.0&bokeh-session-id=77vu529pcuD3

2mE3fnhAN6Z2o3zqlDkxgEtzZSKyGZs’,
version=‘HTTP/1.1’, remote_ip=‘::1’, headers={‘Origin’:
http://localhost:5006’, ‘Upgrade’: ‘websocket’, 'Accept-La

guage’:
‘en-US,en;q=0.8’, ‘Accept-Encoding’: ‘gzip, deflate, sdch, br’,
‘Sec-Websocket-Version’: ‘13’, ‘Host’: ‘localhost:5006’, ‘Sec-Websocket-Key’:

‘VdOVoDLpWbJPKT+DeFXb1Q==’,
‘User-Agent’: 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/55.0.2883.87 Safari/537.

6’,
‘Connection’: ‘Upgrade’, ‘Pragma’: ‘no-cache’, ‘Cache-Control’: ‘no-cache’,
‘Sec-Websocket-Extensions’: 'permessage-deflate; client_max_window_bi

s’})

Traceback
(most recent call last):

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\web.py”,
line 1425, in _stack_context_handle_exception

raise_exc_info((type, value, traceback))

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\stack_context.py”,
line 314, in wrapped

ret = fn(*args, **kwargs)

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\websocket.py”,
line 741, in _on_frame_length_16

self.stream.read_bytes(4, self._on_masking_key)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”,
line 317, in read_bytes

self._try_inline_read()

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”,
line 699, in _try_inline_read

self._read_from_buffer(pos)

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”,
line 770, in _read_from_buffer

self._run_read_callback(pos, False)

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”,
line 682, in _run_read_callback

self._run_callback(callback, self._consume(size))

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”,
line 583, in _run_callback

self.io_loop.add_callback(wrapper)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 962, in add_callback

stack_context.wrap(callback), *args, **kwargs))

MemoryError

2017-01-21
09:44:11,838 Exception in callback <functools.partial object at
0x66B87720>

Traceback
(most recent call last):

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 619, in _run_callback

self.add_future(ret, lambda f: f.result())

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 596, in add_future

lambda future: self.add_callback(callback, future))

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\concurrent.py”,
line 265, in add_done_callback

fn(self)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 596, in

lambda future: self.add_callback(callback, future))

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 962, in add_callback

stack_context.wrap(callback), *args, **kwargs))

MemoryError

Hi All,

I seem to be running into a memory issue after leaving my live streaming app on for a number of hours. Any ideas? Here is my code.

class LiveGrapher: #Observer

def __init__(self, observable):
    self.datasetsDisplayed = observable.registerObserver(self)
    self.source = {}
    self.colors = ['grey', 'yellow', 'LightSkyBlue', 'red', 'green', 'blue','AliceBlue', 'AniqueWhite', 'Aqua', 'Aquamarine', 'Azure', 'Beige', 'Bisque']
    for item in self.datasetsDisplayed:
        self.source[item] = ColumnDataSource(data=dict(x=[], y=[], dateStampStr = [], timeStampStr = [], key = []))
       
    self.doc = curdoc()  

def notify(self, observable, *args, **kwargs):
    timeStamp = ''
    YKey = ''
    YVal = 0
    timeStamp = kwargs['timeStamp'] - datetime.timedelta(hours=5)
    for key in kwargs.keys():
        if key in self.datasetsDisplayed:
           YVal = kwargs[key]
           self.doc.add_next_tick_callback(partial(self.update, x=timeStamp, y=YVal, key =key))
          
   

def update(self, x, y, key):
    self.source[key].stream(dict(x=[x], y=[y], key = [key], dateStampStr=[x.strftime('%m/%d/%Y')], timeStampStr=[x.strftime('%H:%M:%S')]), 30)


def draw(self):
    drawTools = [BoxZoomTool(), ResetTool(), HoverTool( tooltips=[('key', '@key'), ('date', '@dateStampStr'), ('time', '@timeStampStr'), ('value' , '@y')])]
    now = datetime.datetime.now()
    #hourandMinute = now.strftime("%H:%M")
    #titlef = "DLHV Live Analysis for the past 1 Hour" %hourandMinute
   
    p = figure(title="DLHV Live Analysis for the past 1 Hour", x_axis_type="datetime", x_axis_label='Time', y_axis_label = 'Value',y_range=[0,2000], tools=drawTools, plot_width=1000)
   
    colorID = 0
    for dataset in self.datasetsDisplayed:
        p.line(x='x', y='y', legend = dataset, source=self.source[dataset], line_color=self.colors[colorID])
        #p.square(x='x', y='y', legend= dataset, source=self.source[dataset], fill_color=None, line_color=self.colors[colorID])
        colorID = colorID + 1
    p.legend.location = "top_right"
    p.legend.background_fill_color = "grey"
    p.legend.background_fill_alpha = 0.5
   

    self.doc.add_root(p)

#ecuAddress = raw_input(“Please enter ECU Address:”)
dlhvMonitor1 = DlhvMonitor(‘10.215.21.136’)
lg1 = LiveGrapher(dlhvMonitor1)
lg1.draw()

thread = Thread(target = dlhvMonitor1.startDataRetrieval)
thread.start()

and here is the log:

Looks like I’m facing whatever issue is in Memory problem with bokeh server · Issue #4007 · bokeh/bokeh · GitHub. is there any fix/workaround for it?

···

On Monday, 23 January 2017 14:41:54 UTC, Eugene Cheung wrote:

lambda future: self.add_callback(callback, future))

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 962, in add_callback

stack_context.wrap(callback), *args, **kwargs))

MemoryError

2017-01-21
09:42:06,334 Exception in callback <functools.partial object at
0x7889E340>

Traceback
(most recent call last):

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 619, in _run_callback

self.add_future(ret, lambda f: f.result())

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 596, in add_future

lambda future: self.add_callback(callback, future))

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\concurrent.py”,
line 265, in add_done_callback

fn(self)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 596, in

lambda future: self.add_callback(callback, future))

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 962, in add_callback

stack_context.wrap(callback), *args, **kwargs))

MemoryError

2017-01-21
09:44:11,214 Uncaught exception GET
/liveGrapher/ws?bokeh-protocol-version=1.0&bokeh-session-id=77vu529pcuD3g2mE3fnhAN6Z2o3zqlDkxgEtzZSKyG

s
(::1)

HTTPServerRequest(protocol=‘http’,
host=‘localhost:5006’, method=‘GET’,
uri='/liveGrapher/ws?bokeh-protocol-version=1.0&bokeh-session-id=77vu529pcuD3

2mE3fnhAN6Z2o3zqlDkxgEtzZSKyGZs’,
version=‘HTTP/1.1’, remote_ip=‘::1’, headers={‘Origin’:
http://localhost:5006’, ‘Upgrade’: ‘websocket’, 'Accept-La

guage’:
‘en-US,en;q=0.8’, ‘Accept-Encoding’: ‘gzip, deflate, sdch, br’,
‘Sec-Websocket-Version’: ‘13’, ‘Host’: ‘localhost:5006’, ‘Sec-Websocket-Key’:

‘VdOVoDLpWbJPKT+DeFXb1Q==’,
‘User-Agent’: 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/55.0.2883.87 Safari/537.

6’,
‘Connection’: ‘Upgrade’, ‘Pragma’: ‘no-cache’, ‘Cache-Control’: ‘no-cache’,
‘Sec-Websocket-Extensions’: 'permessage-deflate; client_max_window_bi

s’})

Traceback
(most recent call last):

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\web.py”,
line 1425, in _stack_context_handle_exception

raise_exc_info((type, value, traceback))

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\stack_context.py”,
line 314, in wrapped

ret = fn(*args, **kwargs)

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\websocket.py”,
line 741, in _on_frame_length_16

self.stream.read_bytes(4, self._on_masking_key)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”,
line 317, in read_bytes

self._try_inline_read()

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”,
line 699, in _try_inline_read

self._read_from_buffer(pos)

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”,
line 770, in _read_from_buffer

self._run_read_callback(pos, False)

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”,
line 682, in _run_read_callback

self._run_callback(callback, self._consume(size))

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”,
line 583, in _run_callback

self.io_loop.add_callback(wrapper)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 962, in add_callback

stack_context.wrap(callback), *args, **kwargs))

MemoryError

2017-01-21
09:44:11,838 Exception in callback <functools.partial object at
0x66B87720>

Traceback
(most recent call last):

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 619, in _run_callback

self.add_future(ret, lambda f: f.result())

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 596, in add_future

lambda future: self.add_callback(callback, future))

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\concurrent.py”,
line 265, in add_done_callback

fn(self)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 596, in

lambda future: self.add_callback(callback, future))

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 962, in add_callback

stack_context.wrap(callback), *args, **kwargs))

MemoryError

Hi All,

I seem to be running into a memory issue after leaving my live streaming app on for a number of hours. Any ideas? Here is my code.

class LiveGrapher: #Observer

def __init__(self, observable):
    self.datasetsDisplayed = observable.registerObserver(self)
    self.source = {}
    self.colors = ['grey', 'yellow', 'LightSkyBlue', 'red', 'green', 'blue','AliceBlue', 'AniqueWhite', 'Aqua', 'Aquamarine', 'Azure', 'Beige', 'Bisque']
    for item in self.datasetsDisplayed:
        self.source[item] = ColumnDataSource(data=dict(x=[], y=[], dateStampStr = [], timeStampStr = [], key = []))
       
    self.doc = curdoc()  

def notify(self, observable, *args, **kwargs):
    timeStamp = ''
    YKey = ''
    YVal = 0
    timeStamp = kwargs['timeStamp'] - datetime.timedelta(hours=5)
    for key in kwargs.keys():
        if key in self.datasetsDisplayed:
           YVal = kwargs[key]
           self.doc.add_next_tick_callback(partial(self.update, x=timeStamp, y=YVal, key =key))
          
   

def update(self, x, y, key):
    self.source[key].stream(dict(x=[x], y=[y], key = [key], dateStampStr=[x.strftime('%m/%d/%Y')], timeStampStr=[x.strftime('%H:%M:%S')]), 30)


def draw(self):
    drawTools = [BoxZoomTool(), ResetTool(), HoverTool( tooltips=[('key', '@key'), ('date', '@dateStampStr'), ('time', '@timeStampStr'), ('value' , '@y')])]
    now = datetime.datetime.now()
    #hourandMinute = now.strftime("%H:%M")
    #titlef = "DLHV Live Analysis for the past 1 Hour" %hourandMinute
   
    p = figure(title="DLHV Live Analysis for the past 1 Hour", x_axis_type="datetime", x_axis_label='Time', y_axis_label = 'Value',y_range=[0,2000], tools=drawTools, plot_width=1000)
   
    colorID = 0
    for dataset in self.datasetsDisplayed:
        p.line(x='x', y='y', legend = dataset, source=self.source[dataset], line_color=self.colors[colorID])
        #p.square(x='x', y='y', legend= dataset, source=self.source[dataset], fill_color=None, line_color=self.colors[colorID])
        colorID = colorID + 1
    p.legend.location = "top_right"
    p.legend.background_fill_color = "grey"
    p.legend.background_fill_alpha = 0.5
   

    self.doc.add_root(p)

#ecuAddress = raw_input(“Please enter ECU Address:”)
dlhvMonitor1 = DlhvMonitor(‘10.215.21.136’)
lg1 = LiveGrapher(dlhvMonitor1)
lg1.draw()

thread = Thread(target = dlhvMonitor1.startDataRetrieval)
thread.start()

and here is the log:

Eugene,

I am not entirely sure it is the same issue. What you describe sounds much more severe than what is described there. I won't be able to say anything much at the moment. I can only say that I have run about a dozen apps (including OHLC, spectrogram, and surface3d streaming apps) continuously for up to three days without restart, while demoing on conference floors. There are definitely improvements to Bokeh that need to be made regarding memory usage, but it's also possible there are problems in client code. Can you put together a minimal example (perhaps with some kind of synthetic or stubbed out data source)? In order to actually do memory profiling it will be necessary to run real code that exhibits the problem.

Thanks,

Bryan

···

On Jan 23, 2017, at 11:00 AM, Eugene Cheung <[email protected]> wrote:

Looks like I'm facing whatever issue is in Issues · bokeh/bokeh · GitHub. is there any fix/workaround for it?

On Monday, 23 January 2017 14:41:54 UTC, Eugene Cheung wrote:
Hi All,

I seem to be running into a memory issue after leaving my live streaming app on for a number of hours. Any ideas? Here is my code.

class LiveGrapher: #Observer
    
    def __init__(self, observable):
        self.datasetsDisplayed = observable.registerObserver(self)
        self.source = {}
        self.colors = ['grey', 'yellow', 'LightSkyBlue', 'red', 'green', 'blue','AliceBlue', 'AniqueWhite', 'Aqua', 'Aquamarine', 'Azure', 'Beige', 'Bisque']
        for item in self.datasetsDisplayed:
            self.source[item] = ColumnDataSource(data=dict(x=, y=, dateStampStr = , timeStampStr = , key = ))
            
        self.doc = curdoc()
    
    def notify(self, observable, *args, **kwargs):
        timeStamp = ''
        YKey = ''
        YVal = 0
        timeStamp = kwargs['timeStamp'] - datetime.timedelta(hours=5)
        for key in kwargs.keys():
            if key in self.datasetsDisplayed:
               YVal = kwargs[key]
               self.doc.add_next_tick_callback(partial(self.update, x=timeStamp, y=YVal, key =key))
               
    def update(self, x, y, key):
        self.source[key].stream(dict(x=, y=[y], key = [key], dateStampStr=[x.strftime('%m/%d/%Y')], timeStampStr=[x.strftime('%H:%M:%S')]), 30)

    def draw(self):
        drawTools = [BoxZoomTool(), ResetTool(), HoverTool( tooltips=[('key', '@key'), ('date', '@dateStampStr'), ('time', '@timeStampStr'), ('value' , '@y')])]
        now = datetime.datetime.now()
        #hourandMinute = now.strftime("%H:%M")
        #titlef = "DLHV Live Analysis for the past 1 Hour" %hourandMinute
        
        p = figure(title="DLHV Live Analysis for the past 1 Hour", x_axis_type="datetime", x_axis_label='Time', y_axis_label = 'Value',y_range=[0,2000], tools=drawTools, plot_width=1000)
        
        colorID = 0
        for dataset in self.datasetsDisplayed:
            p.line(x='x', y='y', legend = dataset, source=self.source[dataset], line_color=self.colors[colorID])
            #p.square(x='x', y='y', legend= dataset, source=self.source[dataset], fill_color=None, line_color=self.colors[colorID])
            colorID = colorID + 1
        p.legend.location = "top_right"
        p.legend.background_fill_color = "grey"
        p.legend.background_fill_alpha = 0.5
        
        self.doc.add_root(p)
            
#ecuAddress = raw_input("Please enter ECU Address:")
dlhvMonitor1 = DlhvMonitor('10.215.21.136')
lg1 = LiveGrapher(dlhvMonitor1)
lg1.draw()

thread = Thread(target = dlhvMonitor1.startDataRetrieval)
thread.start()

and here is the log:

    lambda future: self.add_callback(callback, future))

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py", line 962, in add_callback

    stack_context.wrap(callback), *args, **kwargs))

MemoryError

2017-01-21 09:42:06,334 Exception in callback <functools.partial object at 0x7889E340>

Traceback (most recent call last):

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py", line 619, in _run_callback

    self.add_future(ret, lambda f: f.result())

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py", line 596, in add_future

    lambda future: self.add_callback(callback, future))

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\concurrent.py", line 265, in add_done_callback

    fn(self)

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py", line 596, in <lambda>

    lambda future: self.add_callback(callback, future))

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py", line 962, in add_callback

    stack_context.wrap(callback), *args, **kwargs))

MemoryError

2017-01-21 09:44:11,214 Uncaught exception GET /liveGrapher/ws?bokeh-protocol-version=1.0&bokeh-session-id=77vu529pcuD3g2mE3fnhAN6Z2o3zqlDkxgEtzZSKyG

s (::1)

HTTPServerRequest(protocol='http', host='localhost:5006', method='GET', uri='/liveGrapher/ws?bokeh-protocol-version=1.0&bokeh-session-id=77vu529pcuD3

2mE3fnhAN6Z2o3zqlDkxgEtzZSKyGZs', version='HTTP/1.1', remote_ip='::1', headers={'Origin': 'http://localhost:5006', 'Upgrade': 'websocket', 'Accept-La

guage': 'en-US,en;q=0.8', 'Accept-Encoding': 'gzip, deflate, sdch, br', 'Sec-Websocket-Version': '13', 'Host': 'localhost:5006', 'Sec-Websocket-Key':

'VdOVoDLpWbJPKT+DeFXb1Q==', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.

6', 'Connection': 'Upgrade', 'Pragma': 'no-cache', 'Cache-Control': 'no-cache', 'Sec-Websocket-Extensions': 'permessage-deflate; client_max_window_bi

s'})

Traceback (most recent call last):

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\web.py", line 1425, in _stack_context_handle_exception

    raise_exc_info((type, value, traceback))

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\stack_context.py", line 314, in wrapped

    ret = fn(*args, **kwargs)

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\websocket.py", line 741, in _on_frame_length_16

    self.stream.read_bytes(4, self._on_masking_key)

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py", line 317, in read_bytes

    self._try_inline_read()

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py", line 699, in _try_inline_read

    self._read_from_buffer(pos)

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py", line 770, in _read_from_buffer

    self._run_read_callback(pos, False)

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py", line 682, in _run_read_callback

    self._run_callback(callback, self._consume(size))

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py", line 583, in _run_callback

    self.io_loop.add_callback(wrapper)

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py", line 962, in add_callback

    stack_context.wrap(callback), *args, **kwargs))

MemoryError

2017-01-21 09:44:11,838 Exception in callback <functools.partial object at 0x66B87720>

Traceback (most recent call last):

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py", line 619, in _run_callback

    self.add_future(ret, lambda f: f.result())

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py", line 596, in add_future

    lambda future: self.add_callback(callback, future))

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\concurrent.py", line 265, in add_done_callback

    fn(self)

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py", line 596, in <lambda>

    lambda future: self.add_callback(callback, future))

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py", line 962, in add_callback

    stack_context.wrap(callback), *args, **kwargs))

MemoryError

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/5d05ed5d-424e-4fb6-8ab5-304305b12b7d%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Hi Bryan,

I think you are totally right. I think it was a problem with a part of the code someone else wrote in our application. I will confirm and post my findings a little later.

Eugene

···

On Monday, 23 January 2017 17:18:26 UTC, Bryan Van de ven wrote:

Eugene,

I am not entirely sure it is the same issue. What you describe sounds much more severe than what is described there. I won’t be able to say anything much at the moment. I can only say that I have run about a dozen apps (including OHLC, spectrogram, and surface3d streaming apps) continuously for up to three days without restart, while demoing on conference floors. There are definitely improvements to Bokeh that need to be made regarding memory usage, but it’s also possible there are problems in client code. Can you put together a minimal example (perhaps with some kind of synthetic or stubbed out data source)? In order to actually do memory profiling it will be necessary to run real code that exhibits the problem.

Thanks,

Bryan

On Jan 23, 2017, at 11:00 AM, Eugene Cheung [email protected] wrote:

Looks like I’m facing whatever issue is in https://github.com/bokeh/bokeh/issues/4007. is there any fix/workaround for it?

On Monday, 23 January 2017 14:41:54 UTC, Eugene Cheung wrote:

Hi All,

I seem to be running into a memory issue after leaving my live streaming app on for a number of hours. Any ideas? Here is my code.

class LiveGrapher: #Observer

def __init__(self, observable):
    self.datasetsDisplayed = observable.registerObserver(self)
    self.source = {}
    self.colors = ['grey', 'yellow', 'LightSkyBlue', 'red', 'green', 'blue','AliceBlue', 'AniqueWhite', 'Aqua', 'Aquamarine', 'Azure', 'Beige', 'Bisque']
    for item in self.datasetsDisplayed:
        self.source[item] = ColumnDataSource(data=dict(x=[], y=[], dateStampStr = [], timeStampStr = [], key = []))
       
    self.doc = curdoc()  

def notify(self, observable, *args, **kwargs):
    timeStamp = ''
    YKey = ''
    YVal = 0
    timeStamp = kwargs['timeStamp'] - datetime.timedelta(hours=5)
    for key in kwargs.keys():
        if key in self.datasetsDisplayed:
           YVal = kwargs[key]
           self.doc.add_next_tick_callback(partial(self.update, x=timeStamp, y=YVal, key =key))
def update(self, x, y, key):
    self.source[key].stream(dict(x=[x], y=[y], key = [key], dateStampStr=[x.strftime('%m/%d/%Y')], timeStampStr=[x.strftime('%H:%M:%S')]), 30)
def draw(self):
    drawTools = [BoxZoomTool(), ResetTool(), HoverTool( tooltips=[('key', '@key'), ('date', '@dateStampStr'), ('time', '@timeStampStr'), ('value' , '@y')])]
    now = datetime.datetime.now()
    #hourandMinute = now.strftime("%H:%M")
    #titlef = "DLHV Live Analysis for the past 1 Hour" %hourandMinute
    p = figure(title="DLHV Live Analysis for the past 1 Hour", x_axis_type="datetime", x_axis_label='Time', y_axis_label = 'Value',y_range=[0,2000], tools=drawTools, plot_width=1000)
    colorID = 0
    for dataset in self.datasetsDisplayed:
        p.line(x='x', y='y', legend = dataset, source=self.source[dataset], line_color=self.colors[colorID])
        #p.square(x='x', y='y', legend= dataset, source=self.source[dataset], fill_color=None, line_color=self.colors[colorID])
        colorID = colorID + 1
    p.legend.location = "top_right"
    p.legend.background_fill_color = "grey"
    p.legend.background_fill_alpha = 0.5
    self.doc.add_root(p)

#ecuAddress = raw_input(“Please enter ECU Address:”)

dlhvMonitor1 = DlhvMonitor(‘10.215.21.136’)

lg1 = LiveGrapher(dlhvMonitor1)

lg1.draw()

thread = Thread(target = dlhvMonitor1.startDataRetrieval)

thread.start()

and here is the log:

lambda future: self.add_callback(callback, future))

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”, line 962, in add_callback

stack_context.wrap(callback), *args, **kwargs))

MemoryError

2017-01-21 09:42:06,334 Exception in callback <functools.partial object at 0x7889E340>

Traceback (most recent call last):

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”, line 619, in _run_callback

self.add_future(ret, lambda f: f.result())

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”, line 596, in add_future

lambda future: self.add_callback(callback, future))

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\concurrent.py”, line 265, in add_done_callback

fn(self)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”, line 596, in

lambda future: self.add_callback(callback, future))

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”, line 962, in add_callback

stack_context.wrap(callback), *args, **kwargs))

MemoryError

2017-01-21 09:44:11,214 Uncaught exception GET /liveGrapher/ws?bokeh-protocol-version=1.0&bokeh-session-id=77vu529pcuD3g2mE3fnhAN6Z2o3zqlDkxgEtzZSKyG

s (::1)

HTTPServerRequest(protocol=‘http’, host=‘localhost:5006’, method=‘GET’, uri='/liveGrapher/ws?bokeh-protocol-version=1.0&bokeh-session-id=77vu529pcuD3

2mE3fnhAN6Z2o3zqlDkxgEtzZSKyGZs’, version=‘HTTP/1.1’, remote_ip=‘::1’, headers={‘Origin’: ‘http://localhost:5006’, ‘Upgrade’: ‘websocket’, 'Accept-La

guage’: ‘en-US,en;q=0.8’, ‘Accept-Encoding’: ‘gzip, deflate, sdch, br’, ‘Sec-Websocket-Version’: ‘13’, ‘Host’: ‘localhost:5006’, ‘Sec-Websocket-Key’:

‘VdOVoDLpWbJPKT+DeFXb1Q==’, ‘User-Agent’: 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.

6’, ‘Connection’: ‘Upgrade’, ‘Pragma’: ‘no-cache’, ‘Cache-Control’: ‘no-cache’, ‘Sec-Websocket-Extensions’: 'permessage-deflate; client_max_window_bi

s’})

Traceback (most recent call last):

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\web.py”, line 1425, in _stack_context_handle_exception

raise_exc_info((type, value, traceback))

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\stack_context.py”, line 314, in wrapped

ret = fn(*args, **kwargs)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\websocket.py”, line 741, in _on_frame_length_16

self.stream.read_bytes(4, self._on_masking_key)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”, line 317, in read_bytes

self._try_inline_read()

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”, line 699, in _try_inline_read

self._read_from_buffer(pos)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”, line 770, in _read_from_buffer

self._run_read_callback(pos, False)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”, line 682, in _run_read_callback

self._run_callback(callback, self._consume(size))

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”, line 583, in _run_callback

self.io_loop.add_callback(wrapper)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”, line 962, in add_callback

stack_context.wrap(callback), *args, **kwargs))

MemoryError

2017-01-21 09:44:11,838 Exception in callback <functools.partial object at 0x66B87720>

Traceback (most recent call last):

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”, line 619, in _run_callback

self.add_future(ret, lambda f: f.result())

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”, line 596, in add_future

lambda future: self.add_callback(callback, future))

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\concurrent.py”, line 265, in add_done_callback

fn(self)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”, line 596, in

lambda future: self.add_callback(callback, future))

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”, line 962, in add_callback

stack_context.wrap(callback), *args, **kwargs))

MemoryError


You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/5d05ed5d-424e-4fb6-8ab5-304305b12b7d%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

So I figured out that the issue actually has to do with Bokeh. It essentially has to do with the ratio between the values of bigNumberBad and smallNumberBadder… There appears to be some read buffer (filled with callbacks) that is being updated much slower than the write. once the buffer is set to a value that is too large (bigNumberBad) there is no way the writes can keep up with the smallNumberBadder. They always have to be in good proportion to work properly… otherwise memory of callbacks increases drastically.

Given this following code

from liveGrapherBackEnd import DlhvMonitor

import sys, re, datetime, time

from elog_monitor import ELogInstream, ELogMonitor, dateTimeAdjust

from functools import partial

from random import random

from threading import Thread

from bokeh.models import ColumnDataSource, Range1d

from bokeh.plotting import curdoc, figure, output_file

from bokeh.models import BoxZoomTool, ResetTool, HoverTool, PanTool

import os

import gc

bigNumberBad = 50,000

smallNumberBadder = 0.02

class testReg:

def init(self):

self.val= 500;

self.val2= 600;

self.val3= 700;

self.val4= 800;

self.val5= 900;

self.val6= 1000;

self.val7= 1100;

self.val8= 1200;

self.val9= 1300;

self.Observers =

def startLoop(self):

while True:

self.loop();

def loop(self):

time.sleep(smallNumberBadder)

t = datetime.datetime.now()

args = {‘timeStamp’:t,‘val’:self.val, ‘val2’:self.val2, ‘val3’:self.val3, ‘val4’:self.val4, ‘val5’:self.val5, ‘val6’:self.val6, ‘val7’:self.val7, ‘val8’:self.val8, ‘val9’:self.val9}

self.notifyObservers(**args)

def registerObserver(self, observers):

self.Observers.append(observers)

dataTypesDisplayed = {‘val’, ‘val2’,‘val3’,‘val4’,‘val5’, ‘val6’, ‘val7’,‘val8’,‘val9’}

return dataTypesDisplayed

def notifyObservers(self, *args, **kwargs):

for observer in self.Observers:

observer.notify(self, *args, **kwargs)

class LiveGrapher: #Observer

def init(self, observable):

self.datasetsDisplayed = observable.registerObserver(self)

self.source = {}

self.colors = [‘red’, ‘yellow’, ‘LightSkyBlue’, ‘green’ ,‘grey’ , ‘pink’, ‘blue’,‘AliceBlue’, ‘Aqua’, ‘Aquamarine’, ‘Azure’, ‘Beige’, ‘Bisque’]

for item in self.datasetsDisplayed:

self.source[item] = ColumnDataSource(data=dict(x=, y=, dateStampStr = , timeStampStr = , key = ))

self.doc = curdoc()

def notify(self, observable, *args, **kwargs):

timeStamp = ‘’

YKey = ‘’

YVal = 0

timeStamp = kwargs[‘timeStamp’] - datetime.timedelta(hours=5)

for key in kwargs.keys():

if key in self.datasetsDisplayed:

YVal = kwargs[key]

self.doc.add_next_tick_callback(partial(self.update, x=timeStamp, y=YVal, key =key))

def update(self, x, y, key):

self.source[key].stream(dict(x=, y=[y], key = [key], dateStampStr=[x.strftime(‘%m/%d/%Y’)], timeStampStr=[x.strftime(‘%H:%M:%S’)]), bigNumberBad)

def draw(self):

drawTools = [BoxZoomTool(), ResetTool(), PanTool(dimensions=‘width’), HoverTool( tooltips=[(‘key’, ‘@key’), (‘date’, ‘@dateStampStr’), (‘time’, ‘@timeStampStr’), (‘value’ , ‘@y’)])]

#hourandMinute = now.strftime(“%H:%M”)

#titlef = “DLHV Live Analysis for the past half hour” %hourandMinute

p = figure(title=“DLHV Live Analysis for the past 1 Hour”, x_axis_type=“datetime”, x_axis_label=‘Time’, y_axis_label = ‘Value’,y_range=[0,2000], tools=drawTools, plot_width=1000)

colorID = 0

for dataset in self.datasetsDisplayed:

p.line(x=‘x’, y=‘y’, legend = dataset, source=self.source[dataset], line_color=self.colors[colorID])

colorID = colorID + 1

p.legend.location = “top_right”

p.legend.background_fill_color = “grey”

p.legend.background_fill_alpha = 0.5

self.doc.add_root(p)

···

On Monday, 23 January 2017 14:34:28 UTC-5, Eugene Cheung wrote:

Hi Bryan,

I think you are totally right. I think it was a problem with a part of the code someone else wrote in our application. I will confirm and post my findings a little later.

Eugene

On Monday, 23 January 2017 17:18:26 UTC, Bryan Van de ven wrote:

Eugene,

I am not entirely sure it is the same issue. What you describe sounds much more severe than what is described there. I won’t be able to say anything much at the moment. I can only say that I have run about a dozen apps (including OHLC, spectrogram, and surface3d streaming apps) continuously for up to three days without restart, while demoing on conference floors. There are definitely improvements to Bokeh that need to be made regarding memory usage, but it’s also possible there are problems in client code. Can you put together a minimal example (perhaps with some kind of synthetic or stubbed out data source)? In order to actually do memory profiling it will be necessary to run real code that exhibits the problem.

Thanks,

Bryan

On Jan 23, 2017, at 11:00 AM, Eugene Cheung [email protected] wrote:

Looks like I’m facing whatever issue is in https://github.com/bokeh/bokeh/issues/4007. is there any fix/workaround for it?

On Monday, 23 January 2017 14:41:54 UTC, Eugene Cheung wrote:

Hi All,

I seem to be running into a memory issue after leaving my live streaming app on for a number of hours. Any ideas? Here is my code.

class LiveGrapher: #Observer

def __init__(self, observable):
    self.datasetsDisplayed = observable.registerObserver(self)
    self.source = {}
    self.colors = ['grey', 'yellow', 'LightSkyBlue', 'red', 'green', 'blue','AliceBlue', 'AniqueWhite', 'Aqua', 'Aquamarine', 'Azure', 'Beige', 'Bisque']
    for item in self.datasetsDisplayed:
        self.source[item] = ColumnDataSource(data=dict(x=[], y=[], dateStampStr = [], timeStampStr = [], key = []))
       
    self.doc = curdoc()  

def notify(self, observable, *args, **kwargs):
    timeStamp = ''
    YKey = ''
    YVal = 0
    timeStamp = kwargs['timeStamp'] - datetime.timedelta(hours=5)
    for key in kwargs.keys():
        if key in self.datasetsDisplayed:
           YVal = kwargs[key]
           self.doc.add_next_tick_callback(partial(self.update, x=timeStamp, y=YVal, key =key))
def update(self, x, y, key):
    self.source[key].stream(dict(x=[x], y=[y], key = [key], dateStampStr=[x.strftime('%m/%d/%Y')], timeStampStr=[x.strftime('%H:%M:%S')]), 30)
def draw(self):
    drawTools = [BoxZoomTool(), ResetTool(), HoverTool( tooltips=[('key', '@key'), ('date', '@dateStampStr'), ('time', '@timeStampStr'), ('value' , '@y')])]
    now = datetime.datetime.now()
    #hourandMinute = now.strftime("%H:%M")
    #titlef = "DLHV Live Analysis for the past 1 Hour" %hourandMinute
    p = figure(title="DLHV Live Analysis for the past 1 Hour", x_axis_type="datetime", x_axis_label='Time', y_axis_label = 'Value',y_range=[0,2000], tools=drawTools, plot_width=1000)
    colorID = 0
    for dataset in self.datasetsDisplayed:
        p.line(x='x', y='y', legend = dataset, source=self.source[dataset], line_color=self.colors[colorID])
        #p.square(x='x', y='y', legend= dataset, source=self.source[dataset], fill_color=None, line_color=self.colors[colorID])
        colorID = colorID + 1
    p.legend.location = "top_right"
    p.legend.background_fill_color = "grey"
    p.legend.background_fill_alpha = 0.5
    self.doc.add_root(p)

#ecuAddress = raw_input(“Please enter ECU Address:”)

dlhvMonitor1 = DlhvMonitor(‘10.215.21.136’)

lg1 = LiveGrapher(dlhvMonitor1)

lg1.draw()

thread = Thread(target = dlhvMonitor1.startDataRetrieval)

thread.start()

and here is the log:

lambda future: self.add_callback(callback, future))

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”, line 962, in add_callback

stack_context.wrap(callback), *args, **kwargs))

MemoryError

2017-01-21 09:42:06,334 Exception in callback <functools.partial object at 0x7889E340>

Traceback (most recent call last):

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”, line 619, in _run_callback

self.add_future(ret, lambda f: f.result())

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”, line 596, in add_future

lambda future: self.add_callback(callback, future))

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\concurrent.py”, line 265, in add_done_callback

fn(self)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”, line 596, in

lambda future: self.add_callback(callback, future))

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”, line 962, in add_callback

stack_context.wrap(callback), *args, **kwargs))

MemoryError

2017-01-21 09:44:11,214 Uncaught exception GET /liveGrapher/ws?bokeh-protocol-version=1.0&bokeh-session-id=77vu529pcuD3g2mE3fnhAN6Z2o3zqlDkxgEtzZSKyG

s (::1)

HTTPServerRequest(protocol=‘http’, host=‘localhost:5006’, method=‘GET’, uri='/liveGrapher/ws?bokeh-protocol-version=1.0&bokeh-session-id=77vu529pcuD3

2mE3fnhAN6Z2o3zqlDkxgEtzZSKyGZs’, version=‘HTTP/1.1’, remote_ip=‘::1’, headers={‘Origin’: ‘http://localhost:5006’, ‘Upgrade’: ‘websocket’, 'Accept-La

guage’: ‘en-US,en;q=0.8’, ‘Accept-Encoding’: ‘gzip, deflate, sdch, br’, ‘Sec-Websocket-Version’: ‘13’, ‘Host’: ‘localhost:5006’, ‘Sec-Websocket-Key’:

‘VdOVoDLpWbJPKT+DeFXb1Q==’, ‘User-Agent’: 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.

6’, ‘Connection’: ‘Upgrade’, ‘Pragma’: ‘no-cache’, ‘Cache-Control’: ‘no-cache’, ‘Sec-Websocket-Extensions’: 'permessage-deflate; client_max_window_bi

s’})

Traceback (most recent call last):

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\web.py”, line 1425, in _stack_context_handle_exception

raise_exc_info((type, value, traceback))

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\stack_context.py”, line 314, in wrapped

ret = fn(*args, **kwargs)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\websocket.py”, line 741, in _on_frame_length_16

self.stream.read_bytes(4, self._on_masking_key)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”, line 317, in read_bytes

self._try_inline_read()

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”, line 699, in _try_inline_read

self._read_from_buffer(pos)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”, line 770, in _read_from_buffer

self._run_read_callback(pos, False)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”, line 682, in _run_read_callback

self._run_callback(callback, self._consume(size))

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”, line 583, in _run_callback

self.io_loop.add_callback(wrapper)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”, line 962, in add_callback

stack_context.wrap(callback), *args, **kwargs))

MemoryError

2017-01-21 09:44:11,838 Exception in callback <functools.partial object at 0x66B87720>

Traceback (most recent call last):

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”, line 619, in _run_callback

self.add_future(ret, lambda f: f.result())

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”, line 596, in add_future

lambda future: self.add_callback(callback, future))

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\concurrent.py”, line 265, in add_done_callback

fn(self)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”, line 596, in

lambda future: self.add_callback(callback, future))

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”, line 962, in add_callback

stack_context.wrap(callback), *args, **kwargs))

MemoryError


You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/5d05ed5d-424e-4fb6-8ab5-304305b12b7d%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Sorry just remove some of the unnesssary imports.

···

On Monday, 23 January 2017 09:41:54 UTC-5, Eugene Cheung wrote:

lambda future: self.add_callback(callback, future))

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 962, in add_callback

stack_context.wrap(callback), *args, **kwargs))

MemoryError

2017-01-21
09:42:06,334 Exception in callback <functools.partial object at
0x7889E340>

Traceback
(most recent call last):

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 619, in _run_callback

self.add_future(ret, lambda f: f.result())

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 596, in add_future

lambda future: self.add_callback(callback, future))

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\concurrent.py”,
line 265, in add_done_callback

fn(self)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 596, in

lambda future: self.add_callback(callback, future))

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 962, in add_callback

stack_context.wrap(callback), *args, **kwargs))

MemoryError

2017-01-21
09:44:11,214 Uncaught exception GET
/liveGrapher/ws?bokeh-protocol-version=1.0&bokeh-session-id=77vu529pcuD3g2mE3fnhAN6Z2o3zqlDkxgEtzZSKyG

s
(::1)

HTTPServerRequest(protocol=‘http’,
host=‘localhost:5006’, method=‘GET’,
uri='/liveGrapher/ws?bokeh-protocol-version=1.0&bokeh-session-id=77vu529pcuD3

2mE3fnhAN6Z2o3zqlDkxgEtzZSKyGZs’,
version=‘HTTP/1.1’, remote_ip=‘::1’, headers={‘Origin’:
http://localhost:5006’, ‘Upgrade’: ‘websocket’, 'Accept-La

guage’:
‘en-US,en;q=0.8’, ‘Accept-Encoding’: ‘gzip, deflate, sdch, br’,
‘Sec-Websocket-Version’: ‘13’, ‘Host’: ‘localhost:5006’, ‘Sec-Websocket-Key’:

‘VdOVoDLpWbJPKT+DeFXb1Q==’,
‘User-Agent’: 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/55.0.2883.87 Safari/537.

6’,
‘Connection’: ‘Upgrade’, ‘Pragma’: ‘no-cache’, ‘Cache-Control’: ‘no-cache’,
‘Sec-Websocket-Extensions’: 'permessage-deflate; client_max_window_bi

s’})

Traceback
(most recent call last):

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\web.py”,
line 1425, in _stack_context_handle_exception

raise_exc_info((type, value, traceback))

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\stack_context.py”,
line 314, in wrapped

ret = fn(*args, **kwargs)

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\websocket.py”,
line 741, in _on_frame_length_16

self.stream.read_bytes(4, self._on_masking_key)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”,
line 317, in read_bytes

self._try_inline_read()

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”,
line 699, in _try_inline_read

self._read_from_buffer(pos)

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”,
line 770, in _read_from_buffer

self._run_read_callback(pos, False)

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”,
line 682, in _run_read_callback

self._run_callback(callback, self._consume(size))

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py”,
line 583, in _run_callback

self.io_loop.add_callback(wrapper)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 962, in add_callback

stack_context.wrap(callback), *args, **kwargs))

MemoryError

2017-01-21
09:44:11,838 Exception in callback <functools.partial object at
0x66B87720>

Traceback
(most recent call last):

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 619, in _run_callback

self.add_future(ret, lambda f: f.result())

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 596, in add_future

lambda future: self.add_callback(callback, future))

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\concurrent.py”,
line 265, in add_done_callback

fn(self)

File “c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 596, in

lambda future: self.add_callback(callback, future))

File
“c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py”,
line 962, in add_callback

stack_context.wrap(callback), *args, **kwargs))

MemoryError

Hi All,

I seem to be running into a memory issue after leaving my live streaming app on for a number of hours. Any ideas? Here is my code.

class LiveGrapher: #Observer

def __init__(self, observable):
    self.datasetsDisplayed = observable.registerObserver(self)
    self.source = {}
    self.colors = ['grey', 'yellow', 'LightSkyBlue', 'red', 'green', 'blue','AliceBlue', 'AniqueWhite', 'Aqua', 'Aquamarine', 'Azure', 'Beige', 'Bisque']
    for item in self.datasetsDisplayed:
        self.source[item] = ColumnDataSource(data=dict(x=[], y=[], dateStampStr = [], timeStampStr = [], key = []))
       
    self.doc = curdoc()  

def notify(self, observable, *args, **kwargs):
    timeStamp = ''
    YKey = ''
    YVal = 0
    timeStamp = kwargs['timeStamp'] - datetime.timedelta(hours=5)
    for key in kwargs.keys():
        if key in self.datasetsDisplayed:
           YVal = kwargs[key]
           self.doc.add_next_tick_callback(partial(self.update, x=timeStamp, y=YVal, key =key))
          
   

def update(self, x, y, key):
    self.source[key].stream(dict(x=[x], y=[y], key = [key], dateStampStr=[x.strftime('%m/%d/%Y')], timeStampStr=[x.strftime('%H:%M:%S')]), 30)


def draw(self):
    drawTools = [BoxZoomTool(), ResetTool(), HoverTool( tooltips=[('key', '@key'), ('date', '@dateStampStr'), ('time', '@timeStampStr'), ('value' , '@y')])]
    now = datetime.datetime.now()
    #hourandMinute = now.strftime("%H:%M")
    #titlef = "DLHV Live Analysis for the past 1 Hour" %hourandMinute
   
    p = figure(title="DLHV Live Analysis for the past 1 Hour", x_axis_type="datetime", x_axis_label='Time', y_axis_label = 'Value',y_range=[0,2000], tools=drawTools, plot_width=1000)
   
    colorID = 0
    for dataset in self.datasetsDisplayed:
        p.line(x='x', y='y', legend = dataset, source=self.source[dataset], line_color=self.colors[colorID])
        #p.square(x='x', y='y', legend= dataset, source=self.source[dataset], fill_color=None, line_color=self.colors[colorID])
        colorID = colorID + 1
    p.legend.location = "top_right"
    p.legend.background_fill_color = "grey"
    p.legend.background_fill_alpha = 0.5
   

    self.doc.add_root(p)

#ecuAddress = raw_input(“Please enter ECU Address:”)
dlhvMonitor1 = DlhvMonitor(‘10.215.21.136’)
lg1 = LiveGrapher(dlhvMonitor1)
lg1.draw()

thread = Thread(target = dlhvMonitor1.startDataRetrieval)
thread.start()

and here is the log:

Hi Eugene,

I'd like to look at this but I am in the middle of several other things, so it will not be immediately. Can you add this example code and information to the existing GH issue?

Thanks,

Bryan

···

On Jan 24, 2017, at 2:52 PM, Eugene Cheung <[email protected]> wrote:

Sorry just remove some of the unnesssary imports.

On Monday, 23 January 2017 09:41:54 UTC-5, Eugene Cheung wrote:
Hi All,

I seem to be running into a memory issue after leaving my live streaming app on for a number of hours. Any ideas? Here is my code.

class LiveGrapher: #Observer
    
    def __init__(self, observable):
        self.datasetsDisplayed = observable.registerObserver(self)
        self.source = {}
        self.colors = ['grey', 'yellow', 'LightSkyBlue', 'red', 'green', 'blue','AliceBlue', 'AniqueWhite', 'Aqua', 'Aquamarine', 'Azure', 'Beige', 'Bisque']
        for item in self.datasetsDisplayed:
            self.source[item] = ColumnDataSource(data=dict(x=, y=, dateStampStr = , timeStampStr = , key = ))
            
        self.doc = curdoc()
    
    def notify(self, observable, *args, **kwargs):
        timeStamp = ''
        YKey = ''
        YVal = 0
        timeStamp = kwargs['timeStamp'] - datetime.timedelta(hours=5)
        for key in kwargs.keys():
            if key in self.datasetsDisplayed:
               YVal = kwargs[key]
               self.doc.add_next_tick_callback(partial(self.update, x=timeStamp, y=YVal, key =key))
               
    def update(self, x, y, key):
        self.source[key].stream(dict(x=, y=[y], key = [key], dateStampStr=[x.strftime('%m/%d/%Y')], timeStampStr=[x.strftime('%H:%M:%S')]), 30)

    def draw(self):
        drawTools = [BoxZoomTool(), ResetTool(), HoverTool( tooltips=[('key', '@key'), ('date', '@dateStampStr'), ('time', '@timeStampStr'), ('value' , '@y')])]
        now = datetime.datetime.now()
        #hourandMinute = now.strftime("%H:%M")
        #titlef = "DLHV Live Analysis for the past 1 Hour" %hourandMinute
        
        p = figure(title="DLHV Live Analysis for the past 1 Hour", x_axis_type="datetime", x_axis_label='Time', y_axis_label = 'Value',y_range=[0,2000], tools=drawTools, plot_width=1000)
        
        colorID = 0
        for dataset in self.datasetsDisplayed:
            p.line(x='x', y='y', legend = dataset, source=self.source[dataset], line_color=self.colors[colorID])
            #p.square(x='x', y='y', legend= dataset, source=self.source[dataset], fill_color=None, line_color=self.colors[colorID])
            colorID = colorID + 1
        p.legend.location = "top_right"
        p.legend.background_fill_color = "grey"
        p.legend.background_fill_alpha = 0.5
        
        self.doc.add_root(p)
            
#ecuAddress = raw_input("Please enter ECU Address:")
dlhvMonitor1 = DlhvMonitor('10.215.21.136')
lg1 = LiveGrapher(dlhvMonitor1)
lg1.draw()

thread = Thread(target = dlhvMonitor1.startDataRetrieval)
thread.start()

and here is the log:

    lambda future: self.add_callback(callback, future))

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py", line 962, in add_callback

    stack_context.wrap(callback), *args, **kwargs))

MemoryError

2017-01-21 09:42:06,334 Exception in callback <functools.partial object at 0x7889E340>

Traceback (most recent call last):

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py", line 619, in _run_callback

    self.add_future(ret, lambda f: f.result())

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py", line 596, in add_future

    lambda future: self.add_callback(callback, future))

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\concurrent.py", line 265, in add_done_callback

    fn(self)

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py", line 596, in <lambda>

    lambda future: self.add_callback(callback, future))

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py", line 962, in add_callback

    stack_context.wrap(callback), *args, **kwargs))

MemoryError

2017-01-21 09:44:11,214 Uncaught exception GET /liveGrapher/ws?bokeh-protocol-version=1.0&bokeh-session-id=77vu529pcuD3g2mE3fnhAN6Z2o3zqlDkxgEtzZSKyG

s (::1)

HTTPServerRequest(protocol='http', host='localhost:5006', method='GET', uri='/liveGrapher/ws?bokeh-protocol-version=1.0&bokeh-session-id=77vu529pcuD3

2mE3fnhAN6Z2o3zqlDkxgEtzZSKyGZs', version='HTTP/1.1', remote_ip='::1', headers={'Origin': 'http://localhost:5006', 'Upgrade': 'websocket', 'Accept-La

guage': 'en-US,en;q=0.8', 'Accept-Encoding': 'gzip, deflate, sdch, br', 'Sec-Websocket-Version': '13', 'Host': 'localhost:5006', 'Sec-Websocket-Key':

'VdOVoDLpWbJPKT+DeFXb1Q==', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.

6', 'Connection': 'Upgrade', 'Pragma': 'no-cache', 'Cache-Control': 'no-cache', 'Sec-Websocket-Extensions': 'permessage-deflate; client_max_window_bi

s'})

Traceback (most recent call last):

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\web.py", line 1425, in _stack_context_handle_exception

    raise_exc_info((type, value, traceback))

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\stack_context.py", line 314, in wrapped

    ret = fn(*args, **kwargs)

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\websocket.py", line 741, in _on_frame_length_16

    self.stream.read_bytes(4, self._on_masking_key)

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py", line 317, in read_bytes

    self._try_inline_read()

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py", line 699, in _try_inline_read

    self._read_from_buffer(pos)

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py", line 770, in _read_from_buffer

    self._run_read_callback(pos, False)

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py", line 682, in _run_read_callback

    self._run_callback(callback, self._consume(size))

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\iostream.py", line 583, in _run_callback

    self.io_loop.add_callback(wrapper)

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py", line 962, in add_callback

    stack_context.wrap(callback), *args, **kwargs))

MemoryError

2017-01-21 09:44:11,838 Exception in callback <functools.partial object at 0x66B87720>

Traceback (most recent call last):

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py", line 619, in _run_callback

    self.add_future(ret, lambda f: f.result())

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py", line 596, in add_future

    lambda future: self.add_callback(callback, future))

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\concurrent.py", line 265, in add_done_callback

    fn(self)

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py", line 596, in <lambda>

    lambda future: self.add_callback(callback, future))

  File "c:\python27\lib\site-packages\tornado-4.4.2-py2.7-win32.egg\tornado\ioloop.py", line 962, in add_callback

    stack_context.wrap(callback), *args, **kwargs))

MemoryError

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/f4fcb8e9-9a66-486f-8b64-7e412b7247c6%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.