CoCreate User Forum  

Go Back   CoCreate User Forum > Applications > Data Management
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 04-16-2003, 11:35 AM
tom kirkman's Avatar
tom kirkman tom kirkman is offline
Registered User
 
Join Date: Oct 2002
Location: Perrysburg, Ohio
Posts: 397
Too many instances

I am using WM 11.50 with OSDM 11.5 on windows nt 4.0. Periodically I get an error "Too Many Instances" when saving a part, or a drawing.

Has anyone else experienced this? Any ideas as to what customization I can look for that causes this problem?

Thanks

Tom Kirkman
Reply With Quote
  #2  
Old 04-17-2003, 02:46 AM
ChrisE's Avatar
ChrisE ChrisE is offline
OneSpace Member
 
Join Date: Oct 2002
Location: Grünstadt, Pfalz, Germany
Posts: 121
Does the error message come from WorkManager?

What does the full message say (click on the error message to display it's full length) ?

Maybe too many cache instances ?
Reply With Quote
  #3  
Old 04-17-2003, 05:21 AM
tom kirkman's Avatar
tom kirkman tom kirkman is offline
Registered User
 
Join Date: Oct 2002
Location: Perrysburg, Ohio
Posts: 397
too many instances

The error is from workmanager. I have attached a copy of the error window. It does not specifically mention cache.

Thanks

Tom
Attached Thumbnails
Click image for larger version

Name:	too_many_instances.jpg
Views:	435
Size:	23.1 KB
ID:	98  
Reply With Quote
  #4  
Old 04-22-2003, 12:45 AM
ChrisE's Avatar
ChrisE ChrisE is offline
OneSpace Member
 
Join Date: Oct 2002
Location: Grünstadt, Pfalz, Germany
Posts: 121
Hi Tom,

hope you had a pleasant easter weekend

Although the word "cache" is not mentioned, it looks very much like a cache problem to me.

A cache is a temporary space in the WM session, where an element from the database is loaded into for either reading, modifying, or deleting.

If the same element gets read into cache too often, you might get such a message.

So please check your customization for areas where an element gets read into cache (mostly for reading attribute information), but never gets dropped out of the cache memory.

Look for combinations of the following commands:
Ui_select_element / Ui_drop_element
Ui_select_element / Ui_apply_element
DMS_SELECT_ELEMENT / DMS_DROP
DMS_SELECT_ELEMENT / DMS_APPLY
It is likely that the drop-/apply-commands are missing.

This might apply to other WM specific elements as well, like e.g. the current user or group, so there are also commands like DMS_SELECT_USER or DMS_SELECT_GROUP to check for.

Also, make sure to use proper cache cleanup handling, like e.g.
Code:
LET num_cleanups Dms_get_num_cleanups
Ui_select_element VIEW l_doc_elid
LET l_cid Dms_return_val
LET l_name (GET_CACHE_VALUE l_cid Db_default_name)
Ui_drop_element l_cid
Dms_clear_cleanups_to num_cleanups
Chris

Last edited by ChrisE; 04-22-2003 at 12:47 AM.
Reply With Quote
  #5  
Old 04-22-2003, 12:56 AM
Fred RINCE Fred RINCE is offline
Registered User
 
Join Date: Mar 2003
Location: Mennecy (France)
Posts: 18
too many instances

Probably, you have used open command for read/modification on this element, too many time. (up to 16 times). Cache logical table on this element is full. Perhaps a problem in your macro comand, or in your clean cash ?
Reply With Quote
  #6  
Old 04-22-2003, 04:33 AM
MPalicki MPalicki is offline
Registered User
 
Join Date: Apr 2003
Posts: 11
Thanks for the replies (I work with Tom). I think we have found the offending portion of our customizations. Anybody ambitous enough to analyze this for us and help us correct it?


DEFINE Awmc_2d3d_i_create_link_elem
{---------------------------------------------------------------------------}
{---------------------------------------------------------------------------}
PARAMETER Doc_elid
LOCAL Num_errors
LOCAL Ok
LOCAL Pkelid
LOCAL Pkcid
LOCAL Cid
LOCAL Elid
LOCAL Rcid
LOCAL Ret
LOCAL Index
LOCAL Max_wait
LET Max_wait 20
LET Ok 1
CREATE_LTAB "notes__pkt__ltab"
SQL_QUERY ("SELECT "+Db_elid+" FROM "+Dbr_elements+" WHERE "+
Db_unique_id_string+" = '"+Db_notes_packet+"'") USER_TABLE
"notes__pkt__ltab"
END
LET Pkelid (READ_LTAB "notes__pkt__ltab" 1 1)
LET Num_errors Dms_get_num_errors
LET Index 0
LOOP
LET Pkcid (DMS_SELECT_ELEMENT UPDATE Pkelid)
EXIT_IF ((Pkcid!=ERROR) OR (Index==Max_wait))
IF (Index==0)
Awm_ed_m_display_prompt (GET_CURRENT_WINDOW) (CATGETS "awm.cat" 1024
"Please wait, USER_TABLE is being used by another user!")
END_IF
IF (Index<12)
WAIT 0
ELSE
WAIT 1
END_IF
LET Index (Index+1)
END_LOOP
IF (Pkcid!=ERROR)
Dms_clear_errors Num_errors
ELSE_IF (Index>1)
Dms_clear_errors (Num_errors+1)
END_IF
IF ((TYPE Pkcid)!=STRING)
LET Ok 0
END_IF
IF (Ok)
LET Cid (DMS_CREATE_ELEMENT Awmc_val_2d3d_general)
IF ((TYPE Cid)!=STRING)
LET Ok 0
END_IF
END_IF
IF (Ok)
LET Elid
Dms_filter_errors (GET_CACHE_VALUE Cid Db_elid)
LET Rcid (DMS_ADD_TO_ELEMENT_SET Pkcid Elid MASTER)
LET Num_errors Dms_get_num_errors
LET Ret (SET_CACHE_VALUE Cid Db_default_name "2D-3D LINK")
IF (Ret!=NO_ERROR)
END
Dms_clear_errors Num_errors
END_IF
LET Ret (DMS_APPLY RETAIN Cid)
IF (Ret!=NO_ERROR)
LET Ret (DMS_DELETE_FROM_ELEMENT_SET Rcid)
LET Ret (DMS_DROP Cid)
LET Ok 0
END_IF
LET Ret (DMS_APPLY FLUSH Pkcid)
ELSE_IF ((TYPE Pkcid)==STRING)
LET Ret (DMS_DROP Pkcid)
END_IF
IF (Ok)
IF ((DMS_GET_SCHEMA_VERSION)<8)
LET Rcid (DMS_ADD_ELE_RELATION Cid Doc_elid)
ELSE
Lct_get_2d3d_link_class_type Cid Elid
Lct_get_2d3d_link_class Cid Doc_elid Anno_2d3d_link_class_type
Check_linkclass_in_linkclasstype Anno_2d3d_link_class_type
Anno_2d3d_link_class
IF (Dms_return_val==1)
LET Rcid
Dms_filter_errors (DMS_ADD_LINK Cid Doc_elid Anno_2d3d_link_class)
ELSE
LET Rcid 0
END_IF
END_IF
IF (Rcid==0)
LET Ret (DMS_DELETE Cid)
LET Ret (DMS_APPLY FLUSH Cid)
LET Ok 0
END_IF
END_IF
IF (Ok)
LET Ret (SET_CACHE_VALUE Rcid Db_view_name Awm_2d3d_val_ltype_drawing)
LET Ret (SET_CACHE_VALUE Cid Db_state Awm_2d3d_state_valid)
LET Ret (DMS_APPLY RETAIN Cid)
IF (Ret!=NO_ERROR)
LET Ret (DMS_DELETE Cid)
LET Ret (DMS_APPLY FLUSH Cid)
LET Ok 0
END_IF
END_IF
IF (Ok)
LET Dms_return_val Cid
ELSE
LET Dms_return_val ERROR
END_IF
END_DEFINE
Reply With Quote
  #7  
Old 04-22-2003, 05:38 AM
Fred RINCE Fred RINCE is offline
Registered User
 
Join Date: Mar 2003
Location: Mennecy (France)
Posts: 18
I suppose your problem appears when you test your macro ? If an error occurs in your process, the cacheid of your paquet stay open in modification state. To avoid this, you may use cleanups functions. (dms_push_cleanup; dms_clear_cleanups_to and so on)
So, if you use ui_xxxx command, it's easier, because some of them have already "cleanups" inside. Be carreful. By this way, you'll use triggers.
Another way is to use toggle_packet_policy. In this case, you could create an element without any paquets. (toggle_packet_policy is a switch command).
If you want make a secure transaction, you maight use trans_begin, trans_apply and trans_end command.

You have many choici to change your code
Reply With Quote
  #8  
Old 04-22-2003, 06:29 AM
ChrisE's Avatar
ChrisE ChrisE is offline
OneSpace Member
 
Join Date: Oct 2002
Location: Grünstadt, Pfalz, Germany
Posts: 121
I doubt this is your point of problem, because the macro looks pretty much original (except for the line where the NAME attribute of the new element is being set (line 58)

If this macro was in error, a lot of customers would have the same problem.

Maybe you should contact CoCreate support, and have them analyze a trace of your session.
Reply With Quote
  #9  
Old 04-22-2003, 06:33 AM
MPalicki MPalicki is offline
Registered User
 
Join Date: Apr 2003
Posts: 11
Tried CoCreate; They deferred to the Partner who did the customization. It's been 7 weeks since I sent said partner a copy of our trace logs so he could analyze the problem.

Reply With Quote
  #10  
Old 04-22-2003, 06:36 AM
ChrisE's Avatar
ChrisE ChrisE is offline
OneSpace Member
 
Join Date: Oct 2002
Location: Grünstadt, Pfalz, Germany
Posts: 121
Yes, TOGGLE_PACKET_POLICY would avoid two major problems:
- situation where two people at the same time try to open the notes packet
- SLOW performance for larger installations with many 2D3D-link elements and notes
(I'd rather setup a different packet for the 2D3D-link elements)

If you were to use TOGGLE_PACKET_POLICY, then you would also have to modify the macros where the 2D3D-link elements get modified (e.g. setting the state to invalid as in Awm_2d3d_m_invalidate_links)

I don't see the reason why this macro got "customized" - the SET_CACHE_VALUE to the NAME attribute works in both ways (unless the Db_default_name macro got modified, or the message catalog manipulated)
Reply With Quote
  #11  
Old 04-22-2003, 06:39 AM
ChrisE's Avatar
ChrisE ChrisE is offline
OneSpace Member
 
Join Date: Oct 2002
Location: Grünstadt, Pfalz, Germany
Posts: 121
Send me a copy of the trace so I get an idea at what point WM freaks out.

Maybe we have a chance ... (if it won't take me too long to analyze it - I'm not on the CoCreate pay roll )
Reply With Quote
  #12  
Old 04-22-2003, 06:50 AM
MPalicki MPalicki is offline
Registered User
 
Join Date: Apr 2003
Posts: 11
attached....

Thanks!
Reply With Quote
  #13  
Old 04-22-2003, 07:01 AM
ChrisE's Avatar
ChrisE ChrisE is offline
OneSpace Member
 
Join Date: Oct 2002
Location: Grünstadt, Pfalz, Germany
Posts: 121
Quote:
Originally posted by MPalicki
attached....

Thanks!
Where
Reply With Quote
  #14  
Old 04-22-2003, 07:04 AM
MPalicki MPalicki is offline
Registered User
 
Join Date: Apr 2003
Posts: 11
Try again....
Reply With Quote
  #15  
Old 04-22-2003, 07:07 AM
MPalicki MPalicki is offline
Registered User
 
Join Date: Apr 2003
Posts: 11


Friggin !@#%!#$!

Ok, attaching the trace.txt fle doesn't seem to want to go.

Anybody got any other suggestions?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 03:52 AM.



Hosted by SureServer    Forums   Modeling FAQ   Macro Site   Vendor/Contractors   Software Resellers   CoCreate   Gallery   Home   Board Members   Regional User Groups  By-Laws  

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.