The temperature and stress characteristic of photonic band gap structure resonant cavities with square and graphite lattice have been studied by finite-difference time-domain method. The results show that the resonant cavities, both square and graphite lattice, have more and more resonant frequency with the cavity enlarging. And the curves between the resonant frequency and stress have better linearity. When the cavity enlarges enough, the curve between resonant frequency and temperature will become sectionalized line from nonlinear curve. Especially, the temperature sensitivity will be descending as the cavity is enlarging. Nevertheless, once some structures are put in the center of the cavity, the temperature sensitivity will be rising fast for this kind of cavity. Obviously, this character is convenient for us to achieve the specification measurement for temperature and stress.