Dariusz on Software

Methods and Tools

About This Site

Software development stuff

Archive

Entries from November 2009.

Thu, 26 Nov 2009 12:30:50 +0000

How to drop selected emails from postfix queue (useful when many automated e-mails are blocking it):

# mailq | awk '/^[A-Z0-9].*some.email@domain.com/ {print "postsuper -d " $1} ' | sh

or simpler: purge all queue (warning: you can loose important, undelivered e-mails forever!):

# postsuper -d ALL
Tags: debian.
Thu, 26 Nov 2009 08:57:15 +0000

Sometimes you see that Eclipse stops responding and causes 100% of CPU usage (UI controls not redrawn). The only action can be taken then is to kill eclipse process.

I discovered that it's caused by big console output option. Test suite with low level (DEBUG) messages are able to kill Eclipse IDE, after setting log level to WARN no such problems are present.

You can also disable Limiting console output. It helped when no verbosity could be changed by logging configuration.

1

eclipse

Tags: java.
Thu, 26 Nov 2009 06:03:49 +0000

Ponad rok temu miałem okazję przeprowadzić rutynową operacją jaką jest odnowienie polisy OC na samochód. Pomyślałem sobie, że sprawę załatwię w ciągu kilkunastu minut i pełen optymizmu wybrałem się do przedstawiciela PTU (Polskiego Towarzystwa Ubezpieczeń).

Jakież było moje zdziwienie kiedy na miejscu otrzymałem do przepisania stertę papierowych formularzy. Jako pomoc otrzymałem formularze wypełnione przeze mnie przed rokiem! Poczułem się jakbym żył w średniowieczu. Nawet nie próbowałem pytać dlaczego tak "maltretują" swoich klientów.

Nauczony przykrym doświadczeniem w tym roku zmieniłem ubezpieczyciela. Rejestracja przez internet, żadnego ręcznego przepisywania papierków. PTU w XXI wieku dziękujemy.

logo_ptu

Tags: business.
Sun, 15 Nov 2009 00:01:35 +0000

Graphs

Today I'd like to share some observations on web applications speed. My monitoring network checks almost one thousand of URL addresses and few interesting pictures are created here.

Lets see sample monitoring results from random URL (one week measurment): http://forum.magicsquad.eu (located currently in webh.pl hosting provider):

site-uptime.net-1As you can see typical site response time is almost four seconds! (DNS resolution time excluded) Measurment is performed from Cracow, Poland. Let's see results from Chicago, USA:

s2.site-uptime.net-2Similar picture (slightly slower ping times visible). We have two possibilities here:

  • Script is clumsy (PHPBB)
  • Hosting is overloaded / improperly configured

Long term analysis

Let's see statistics generated by site-uptime.net (monitoring station in Poland):

1As you can see performance degradation (80% -> 10% responses under one second) started 5 months ago!. No one noticed that average page loading drops suddenly (no change of hosting provider since then!).

You can reach current public report for monitored station here.

Conclusions

  • I suggest to monitor site performance and availability, especially if you are making money from them
  • Sometimes fix is at your fingertips (if you know the problem details)
Tags: monitoring.
Mon, 09 Nov 2009 11:00:15 +0000

The error

org.hibernate.PropertyAccessException: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of XYZ.setStatus().

Cause

Using primitive types (long) where NULL is possible or using wrong type (i.e. String if "char" is declared in HBM file).

Resolution

Change from primitive type (long) to wrappers (Long) or ensure correct type is defined in mapping files.

hibernate_logo_a

Tags: hibernate.

Tags

Created by Chronicle v3.5