The problem was with my mysql configuration, I had given autocommit=0 in /etc/mysql/my.cnf to make a huge datafile load faster then I forgot about it.
Because autocommit wouldnt happen the drupal install script would pile up all the transactions and cause a redirect loop.
When I commented the autocommit=0 line the problem went away.