Skip to main content

Posts

Showing posts from July, 2014

Keep slogging help is on the way

When working in startup, don’t lose hope, keep slogging as once you reach scale help is on the way.

So far I have been scaling Mysql by throwing more hardware and focusing only on performance issues detected by new relic or my custom report but there were some data driven anomalies where 99% calls to this query would take 1sec but one call to same query would take 10sec.  I wasn’t focusing much on it because it was a blip in the graph and there were too many other issues to focus on.

Now we got a full time Mysql engineer who is looking at these queries and hunting down suspects. Today he found this query

select sum(points) from (
            select g.all_versions_size as points from folders_trash f
            inner join groups g on f.folder_id = g.folder_id
            union all
            select e1.size as points from groups_trash g1
            inner join entries e1 on g1.group_id=e1.group_id
            union all
            select e2.size as points from entries_trash e2
   …

yellowstone national park lost reciept

Last month I went to yellowstone and we were supposed to stay for 6 days.  Upon entry we were issued a reciept and I lost it. On 4th day we had to go out of the park and come back in. I talked to a ranger about the situation and he said before exiting stop by the gate and ask the ranger at gate.  I did the same and he was kind enough to issue a gate pass to me valid for 2 more days.

Blogging this in case someone else runs into same situation and is googling :).

Spring proxyFactoryBean not applying interceptors and circular dependencies

We use AOP a lot but due to legacy reasons we dont use aspectJ yet and we are using Spring ProxyFactoryBean and use interceptors to apply AOP behavior like light weight instrumentation or transactions.

Lately we ran into two or three issues where on some proxyFactoryBeans the interceptors wont be applied.  My hunch was it was some circular dependency between beans so I added DEBUG on org.springframework.beans in log4j and it spitted tons of logs, I did a grep

grep"that is not fully initialized yet - a consequence of acircularreference" ~/apache-tomcat-7.0.30/logs/tomcat.log |awk -F "singleton" '{print $2}'|sort|uniq  

it would print some message like 



bean 'gdriveClient' that is not fully initialized yet - a consequence of acircularreference  bean 'gdriveRestServiceHelper' that is not fully initialized yet - a consequence of acircularreference  bean 'filerServiceRequestHandlerFactory' that is not fully initialized yet - a consequence of ac…