What do the numbers near a user name on the user list mean?
Re: Followup and fix
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > PHP web-programming > Re: Followup and fix 7 August 2003 08:02:21

  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

Re: Followup and fix

Alex Borges 7 August 2003 08:02:21
 I thinks this is why its going on:

Aug 6 18:13:39 plain postgres[18842]: [12] LOG: query: lock table>phpgw_config in share mode

Share mode makes it so that the data cannot be concurrently changed i
think. The problem is that it doesnt conflict with itself, i think,
because we can see later.....


Aug 6 18:13:39 plain postgres[18838]: [62] LOG: query: delete from
phpgw_config where config_name='mcrypt­_mode'
Aug 6 18:13:39 plain postgres[18838]: [63] LOG: query: insert into
phpgw_config (config_app,config_­name,config_value) values
('phpgwapi','mcrypt­_mode','cbc')
Aug 6 18:13:39 plain postgres[18838]: [64] LOG: query: delete from
phpgw_config where config_name='file_r­epository'
Aug 6 18:13:39 plain postgres[18838]: [65] LOG: query: insert into
phpgw_config (config_app,config_­name,config_value) values
('phpgwapi','file_r­epository','sql')
Aug 6 18:13:39 plain postgres[18838]: [66] LOG: query: delete from
phpgw_config where config_name='file_s­tore_contents'
Aug 6 18:13:39 plain postgres[18838]: [67-1] LOG: query: insert into
phpgw_config (config_app,config_­name,config_value) values
Aug 6 18:13:39 plain postgres[18838]: [67-2]
('phpgwapi','file_s­tore_contents','file­system')
Aug 6 18:13:39 plain postgres[18838]: [68] LOG: query: delete from
phpgw_config where config_name='tz_off­set'
Aug 6 18:13:39 plain postgres[18838]: [69] LOG: query: insert into
phpgw_config (config_app,config_­name,config_value) values
('phpgwapi','tz_off­set','-5')
Aug 6 18:13:39 plain postgres[18838]: [70] LOG: query: delete from
phpgw_config where config_name='asyncs­ervice'
Aug 6 18:13:39 plain postgres[18838]: [71] LOG: query: insert into
phpgw_config (config_app,config_­name,config_value) values
('phpgwapi','asyncs­ervice','off')
Aug 6 18:13:39 plain postgres[18838]: [72] LOG: query: commit

Till here, we are OkAY, it has been commited. The problem i think is the
next one:

First, no begin here....

Aug 6 18:13:39 plain postgres[18839]: [13] LOG: query: lock table
phpgw_app_sessions in share mode
Aug 6 18:13:39 plain postgres[18839]: [14] LOG: query: delete from
phpgw_config where config_app='phpgwap­i'

HERE..... it lets you lock it!

SHARED locks are not self exclusive, this means that two transactions
can lock the same table, hence the deadlock at the end


Aug 6 18:13:39 plain postgres[18840]: [13] LOG: query: lock table
phpgw_app_sessions in share mode
Aug 6 18:13:39 plain postgres[18840]: [14] LOG: query: delete from
phpgw_config where config_app='phpgwap­i'
Aug 6 18:13:39 plain postgres[18840]: [15] ERROR: deadlock detected

Aha, a deadlock it causes you....


So, i looked into it and i found this code in db_pgsql:
{
while ($t = each($table))
{
! $result =
pg_Exec($this->Link­_ID,'lock table ' . $t[1] . ' in share mode');
}
}
else
{
! $result =
pg_Exec($this->Link­_ID, 'lock table ' . $table . ' in share mode');
}
}

Which is wrong, cause writes should be an exclusive share. I changed it
to this:

{
while ($t = each($table))
{
! $result =
pg_Exec($this->Link­_ID,'lock table ' . $t[1] . ' in exclusive mode');
}
}
else
{
! $result =
pg_Exec($this->Link­_ID, 'lock table ' . $table . ' in shared mode');
}
}


And it now works.... savanah patch is:1802

yay


El mi? 06-08-2003 a las 22:44, Alex Borges escribiГі:> In doing performance testing on the thing (elza), im finding some ugly> Deadlock Detected errors under postgres. Im just testing 100 users> performing the login procedure until each user reaches home.php>
This is postgres 7.3 . Stand by for more info.>
___________________­____________________­________> Phpgroupware-develo­pers mailing list> Phpgroupware-develo­pers@gnu.org> http://mail.gnu.org­/mailman/listinfo/ph­pgroupware-developer­s>
Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > PHP web-programming > Re: Followup and fix 7 August 2003 08:02:21

see also:
Problem with SSL request via Windows…
Apache 1.39: Automatically logging…
Issues with proxying and subfolders
пройди тесты:
see also:
C prazdnikom vcex!
MOJA PYKA
Ckoro pjatnica 13.]:-) :-D

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .