« first day (76 days earlier)      last day (558 days later) » 

12:30 AM
@Mego is the server still down?
 
Anonymous
1:18 AM
 
1:34 AM
Omy
 
Anonymous
2:16 AM
Server lives again
 
4:01 AM
new (slightly less temporary but probably still temporary) landing page
 
Anonymous
I like it, except the penguin is gone :(
 
5:06 AM
I will hide some penguins somewhere as an easter egg maybe
Yay, username update work
@Mego will SQLAlchemy do cascade delete? e.g. if we delete answer it will automaticalyl delete related vote items etc.
 
Anonymous
@Downgoat It can. It just needs to be set up right.
 
Anonymous
Actually that needs to be set on the actual DB server
 
Anonymous
But it's not hard
 
5:28 AM
@Mego am I doing this right:
@server.route("/user/<int:user_id>")
@server.route("/user/<int:user_id>/<name>")
def get_user(user_id):
    pass
so I can do things like /user/5/Downgoat for my profile page
 
Anonymous
@Downgoat The first one should be @server.route("/user/<int:user_id>", defaults={"name": None}). Also add a name param to get_user.
 
Anonymous
^ should make auth easier
 
5:56 AM
I ran a profiler and looks like rendering only takes around 15ms per block. Flask itself only takes .5ms to render so not sure why some pages (the ones with lots of answers) take 9s to load while others load in 1s
 
Anonymous
Might just be fluctuations in server load (aka gremlins)
 
Anonymous
Once we move to dedicated hosting, that shouldn't be a problem
 
looks like I profiled the wrong page :P
not sure why the render function is being called almost 300 times though
 
Anonymous
Where do you see 300 calls?
 
top left cell
 
Anonymous
6:00 AM
That's for socket.recv
 
I assume that's waiting time for the STDOUT stream of the child process?
hm there's also a {method 'recv' of '_socket.socket' objects}
 
Anonymous
Either that or from the client
 
Anonymous
Both the various subprocesses that are called (SASS via webassets, node via browserify, node via markdown rendering, Celery stuff, etc.) and the network connection (thanks TCP) use sockets for communication, so it's not surprising at all that there are a bunch of calls to socket.recv
 
webassets/browserify is only called once and then those files are cached though
should only be celery/node communication
 
Anonymous
Oh I also need to set up caching on Flask and Celery properly
 
Anonymous
6:06 AM
Oh also connections to Redis and memcached use sockets for IPC
 
what is memcached used for?
 
Anonymous
Results backend for Celery
 
Anonymous
For smaller tasks (like Markdown rendering of reasonably-sized text), it's more efficient to use memcached for results than Redis
 
ah, that should yeah, be minimizing the amount of calls to node too
 
Anonymous
Since this server has 8 delicious GB of RAM, we can afford the memory usage of memcached to get better speed :P
 
6:20 AM
huh mysql is bulk of the slow-down:
{method 'recv' of '_socket.socket' objects}                                                                                         <-     281    5.345    5.345  /usr/local/lib/python3.6/site-packages/mysql/connector/network.py:234(recv_plain)
5.345s and it does 281 calls
oh i see
for every request we're doing a query for user info (even CSS files, static images, etc.)
that can't be all thoguh
seems like some queries are being repeated?:
2018-01-19 22:28:15,717 INFO sqlalchemy.engine.base.Engine SELECT answer_votes.user_id AS answer_votes_user_id, answer_votes.answer_id AS answer_votes_answer_id, answer_votes.vote AS answer_votes_vote
FROM answer_votes
WHERE answer_votes.answer_id = %(answer_id_1)s
2018-01-19 22:28:15,717 INFO sqlalchemy.engine.base.Engine {'answer_id_1': 120}
2018-01-19 22:28:16,447 INFO sqlalchemy.engine.base.Engine SELECT answer_votes.user_id AS answer_votes_user_id, answer_votes.answer_id AS answer_votes_answer_id, answer_votes.vote AS answer_votes_vote
 
 
6 hours later…
12:59 PM
@Downgoat The "dark theme" button no longer works (on Safari 10.12.2)
 
 
6 hours later…
Anonymous
7:02 PM
@Downgoat Probably need to cache + add lazy loading to User queries
 
10:58 PM
@Mego do we want any length limits/character restrictions on usernames?
 

« first day (76 days earlier)      last day (558 days later) »