Sponsored Links



Archive for May, 2005

Overloaded Sessions

Posted in Techno Stuffs on May 27th, 2005

Finally, I’m going somewhere now in debugging and tuning my assigned application. :D

While looking into the codes, I noticed this java thread which acts as a session manager that kicks in every 10 minutes to flush expired user sessions. During startup this session should load all user sessions stored in the database onto the memory cache. This should only be done once which as I’ve said is during startup, and then subsequent runs would just check the memory cache for expired session deletion. But somehow on every run, the database session retrieval isn’t bypassed. By checking the codes, I found something like this:

dbReloadSessionsDone = false;

If (dbReloadSessionsDone == false) {
//should only be called upon startup
reloadSessionsFromDB();
}


So there’s the culprit! The boolean variable dbReloadSessionsDone was initially declared with a false value but there’s no method or call within the class or subclasses that changes the value to true. This resulted to the reloadSessionsFromDB() method being called after the session manager thread is done sleeping since dbReloadSessionsDone is always false. The solution to this is simple:

If (dbReloadSessionsDone == false) {
//should only be called upon startup
reloadSessionsFromDB();
dbReloadSessionsDone == true;
}

By changingthe value of dbReloadSessionsDone to true after the first call, the reloadSessionsFromDB() method wouldn’t be called anymore on session manager thread subsequent runs.

Well, the fix was simple, but the peformance impact was quite significant considering the amount of data that needs to be directly retrieved from the DB on each call. ;)

Sick Week ..

Posted in Daily Living on May 27th, 2005

Aaarghhh! This weeks seems to be a never ending struggle with different ailments!:mad:

Monday ’til Wednesday were fever days. I was supposed to go on sick leave but just can’t stand the thought of making Aphilo commute to work, especially at these times that she’s pregnant. I would just get worried at home thinking about her commuting alone, and that might make things worst for me.

On Wednesday, cough and colds pinned me down the whole day, but still I had to go to work for Aphilo.

Thursday until now, my eyes are painful. Not sure what happened.. is it due to too stress.. long hours in front of the PC.. I don’t know.. it just happened. At least the fever is gone now, but the cough, cold, and aching eyes are making it hard for me to go through the day. :(

I guess a relaxing weekend would be something I should look forward to, in hopes that I’ll be better then. ;)

EdsaMail Down????

Posted in Techno Stuffs on May 24th, 2005

Geesh! I was surprised to discover that sending email to EdsaMail addresses resulted to failure on my mail servers. I don’t think the problem is from my end since all emails sent through my mail server are sent successfully and my DNS servers are functioning pretty well since it’s directly connected to ROOT servers and doesn’t just forward queries to my ISP’s DNS servers.

Here’s the log I see in my personal mail server using QMail-LDAP (replaced real edsamail username to XXX):

@40000000429282bf21ca9ca4 starting delivery 3287: msg 331217 to remote XXX@edsamail.com.ph
@40000000429282bf21cac3b4 status: local 0/10 remote 1/20
@40000000429282d32241d42c delivery 3287: deferral: Sorry,_I_couldn't_find_any_host_by_that_name._(#4.1.2)/
@40000000429282d32241ff24 status: local 0/10 remote 0/20

Thinking that EdsaMail is a mail service provider, I don’t think this kind of error should ever occur. It’s ok if it’s just a personal mail server of some wannabe geeks, but for a company hosting email solutions, this is quite unacceptable. This is not the first time that this occurred for I’ve seen this error before in some mail servers I host. In fairness to EdsaMail, this is an intermittent problem meaning that sometimes it works, and sometimes it doesn’t.

I think the problem might also be in their DNS servers, namely ns1.edsamail.com.ph and ns2.edsamail.com.ph for when I try to query MX and NS entries on the said servers for their domain, I get a timeout. This means their DNS servers doesn’t reply for domain queries on edsamail.com.ph. I’m not sure if their DNS servers are down or if they are blocking DNS queries for their own domain which shouldn’t be the case. This are the results of the dig command to query their domain info:


# dig @ns1.edsamail.com.ph edsamail.com.ph ANY

; < <>> DiG 9.2.3 < <>> @ns1.edsamail.com.ph edsamail.com.ph ANY
;; global options: printcmd
;; connection timed out; no servers could be reached

# dig @ns2.edsamail.com.ph edsamail.com.ph ANY

; < <>> DiG 9.2.3 < <>> @ns2.edsamail.com.ph edsamail.com.ph ANY
;; global options: printcmd
;; Got answer:
;; ->>HEADER< <- opcode: QUERY, status: SERVFAIL, id: 20041
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;edsamail.com.ph. IN ANY

;; Query time: 134 msec
;; SERVER: 203.177.1.18#53(ns2.edsamail.com.ph)
;; WHEN: Tue May 24 10:42:52 2005
;; MSG SIZE rcvd: 33

# dig edsamail.com.ph ANY

; <<>> DiG 9.2.3 < <>> edsamail.com.ph ANY
;; global options: printcmd
;; Got answer:
;; ->>HEADER< <- opcode: QUERY, status: NOERROR, id: 54398
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;edsamail.com.ph. IN ANY

;; ANSWER SECTION:
edsamail.com.ph. 80192 IN NS ns1.edsamail.com.ph.
edsamail.com.ph. 80192 IN NS ns2.edsamail.com.ph.

;; Query time: 36 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue May 24 10:43:00 2005
;; MSG SIZE rcvd: 69

# dig edsamail.com.ph MX

; <<>> DiG 9.2.3 < <>> edsamail.com.ph MX
;; global options: printcmd
;; connection timed out; no servers could be reached
The way their DNS servers reply to queries is kinda weird, and worst of all, they don’t provide MX records for their domain. I’m not sure if I’m doing something wrong, but definitely this kind of domain query replies cause mail servers not being able to send email messages to EdsaMail users. :(

Oh well, I just hope they do something about this since this is not a good business case for such company.

The Biggest Obstacle of Love

Posted in Daily Living on May 23rd, 2005

Not really sure if most men would agree on this, I just though it’s an
email article that’s nice to blog. :D

If I am to be asked this is definitely something that’s sad but true
about relationships, not that I’m admitting of committing such mistake,
but life is long and who knows??

As my famous saying goes ..”I’m not an angel, nor a devil.. I’m just a
MAN!. But no mater what, I always have a choice.” :D

**********************************************************

The biggest OBSTACLE of LOVE..is .CHEATING….sad but true!!

A lot of men who are in serious relationships
usually end up cheating after a couple of years.
The reason is simple; men stuck in long-term
relationships feel they are missing out on
something. Most of the time, these men cheat
because they are frustrated and need to get it out
of their systems.

Men also like to explore and try new things. The
benefit in this case is that once men do cheat,
they realize that it is nothing special and probably
won’t do it again. This prevents them from being
unfaithful later on when the stakes are higher (like
when they have a family).

HOME SWEET HOME?

When people are in a relationship for a long time,
they can’t help but start taking their significant
other for granted. Sometimes they forget just how
great the woman they have really is. Men forget
how wonderful it feels to have someone who
loves them unconditionally. Cheating usually involves
lustful feelings of physical attraction; nothing long- term.
The result is that once men are unfaithful, they will
lie in bed and think relentlessly about their
unsuspecting partner. Why? Because the lust
factor has worn away and the reality didn’t
measure up to the fantasy. Instead, they
remember the good reality; the woman who loves
them, bakes them cookies and makes love to
them. The old saying “you don’t know what you’ve
got till it’s gone” says it all.

NOTHING LASTS FOREVER?

The most underrated benefit of cheating is that it
opens a man’s eyes to the realization that his
relationship is no longer nurturing and should be
terminated. Some people remain blind to the fact
that their relationship is “on the rocks” and the
only way they can finally realize that it’s not going
to work out is through cheating. It’s a shame that
some men have to go to this extreme to see the
reality: that they’re no longer satisfied with their
situation.

Let’s face it, nothing lasts forever and about 95%
of relationships, married or not, end (i.e. if you date 9
women before you ever marry, your failure rate is
90%, assuming the marriage lasts). When you do
break up, you will probably have a lot of regrets,
especially concerning all the girls you missed out
on — especially if she’s a six-foot tall Swedish
model or very cute Japanese girl-next-door look.

So what did you learn from my point of view? That
cheating is disrespectful towards the person
you’ve cheated on, but at the very least, it has two
beneficial aspects to it.

FIRST, that you’ll realize your mistake and
appreciate your lover a lot more after the horrible
deed.

The SECOND is that cheating can help you realize
your misery within your current relationship, and
will likely give you that necessary shove to move
on and stop wasting both your lover’s and your
own time.

**********************************************************

Avoid Eating Chicken Wings Frequently.

Posted in Daily Living on May 20th, 2005

I’m not sure if this is another hoax spreading through email. But I
guess I could just post it here and maybe someone credible who stumbles
upon this can provide some explanation.

True or False?? Well.. you decide. ;)

**************************************
Avoid Eating Chicken Wings Frequently.

A friend of mine recently had a growth in her womb and she underwent an
operation to remove the cyst. The cyst removed was filled with a dark
coloured blood. She thought that she would be recovered after the
surgery but she was terribly wrong. A relapse occurred just a few months later.

Distressed, she rushed down to her gynecologist for a consultation.
During her consultation, her doctor asked her a question that puzzled her. He
ask if she was a frequent consumer of chicken wings and she replied yes
wondering as to how, he knew of her eating habits.

You see, the truth is in this modern day and age, chickens are injected
with steroids to accelerate their growth so that the needs of this
society can be met. This need is none other then the need for food. Chickens
that are injected with steroids are usually given the shot at the neck or the
wings. Therefore, it is in this places that the highest concentration of
steroids exist.

These steroids have terrifying effects on the body as it accelerates
growth. It has an even more dangerous effect in the presence of female
hormones, this leads to women being more prone to the growth of a cyst
in the womb. Therefore, I advise the people out there to watch their diets
and to lower their frequency of consuming chicken wings!

People who receive this email, please forward it to your friends and
loved ones. I am sure no one wants to see him or her suffer!

**************************************

Garbage Collector In The House..

Posted in Techno Stuffs on May 20th, 2005

I’ve been seeing performance problems with our application which might be related to a memory leak somewhere in our codes. Even if our application is inactive the java memory heap continues to grow, and I just can’t understand why this should be happening. By using HP JTune, I was able to visualize the java memory heap usage and garbage collection activities in our test server.

HPJTune on Test Server

There are good and bad things about this. The good thing is that when a full garbage collector kicks in, most of the unused objects are cleared up, and the bad thing is those objects shouldn’t be there after all considering there’s no activity within the system.

I have a feeling that the java memory heap usage increase might be caused by our logging modules on network connections that sends out keep-alive calls such as our SMSC module since it’s the only module that would be active even if there’s no user accessing our application.

Well, there’s only one way to find out .. furthere investigation.. ;)