If I setup in bitcoin.conf
"blockmaxsize=1000000"
then it will raise this exception. Most likely because of
max_remembered_txs_size = 2500000
in p2pool/p2p.py
I don't know enough python if it is safe or possible to double this value, but it would be nice, if you could take a look into.
The reason for blockmaxsize=1000000 is to include more transactions with more fees for everyone in the pool when solving a block.