Tag Info

Hot answers tagged

10

Open up Computer Management, right click (my) Computer and click "Manage": System Tools > Shared Folders > Open Files To connect to a remote machine, select "Computer Managment (Local)" in the left pane, then pull up the "Action > Connect to another computer..." dialog, enter the computer name, and hit ok. You can disconnect sessions from this interface ...


5

Process Explorer can search for handle on a file On a remote machine however, you want to combine PsExec with Handle in order to execute Handle on the distant computer.


5

I don't know how the PHP flock() function is implemented, but assuming it's an interface to the flock() syscall, then it does not work at all over NFS. From the flock() manpage: flock(2) does not lock files over NFS. Use fcntl(2) instead: that does work over NFS, given a sufficiently recent version of Linux and a server which supports locking. ...


4

flock() works just fine on Linux NFS, including from PHP. We use it extensively and have tested it thoroughly to verify it's working as desired. Check to see if you're running all of the necessary services on both the client and server. Look for "portmapper" and "rpc.statd". If they're not running, you need to figure out which init script starts them on ...


4

No filesystem supports locking at the physical level; all locking is done in the VFS. The ones to worry about are networked filesystems; NFS doesn't support locking unless the nfslock service is running, and other networked filesystems have their own way of handling (or not) locking.


4

You can use sh as a command, enabling you to use &&, ; or || as usual to chain multiple commands as desired inside single quotes. For example to run command1 followed by command2 (if the first exits without errors): setlock lockfile sh -c 'command1 && command2'


4

Try to not forward X when you log in with ssh. You shouldn't really need it, do you? If you do not want to take out ForwardX11 true from your ~/.ssh/config (I am guessing that's where it got set), you can try adding -x to the command line. seq 1000 | parallel -j0 -S server -x echo


3

First off: file locks and pthread mutexes are entirely different beasts. File locks are used to advice the current or other processes that a file is currently not to be used. Pthread mutexes are used to coordinate critical sections between threads in the current process only. File locking is done flock(2) and friends, and conveniently, there's a shell ...


3

We've used process explorer from Microsoft (formerly Sysinternals). You can search for the file name and it will tell you which process is holding on and you can kill the handle on the file. The tool is also great at looking deep into your process tree. It's free too. Good luck!


3

To expand on 3dinfluence's answer. mysqldump will lock the tables with a read lock before dumping them (which is what you're after when you say "freeze"). Depending on your storage engine, the UPDATES (and possibly SELECTS) will be queued up until the dump is complete (at which point it'll unlock the tables). if you want to do it manually, the command ...


3

Look at handle from Sysinternals.


2

You can increase the lock timeout with an InnoDB: Edit /etc/my.cnf or /etc/mysql/my.cnf (assuming your dev machine is Linux/Unix) Uncomment (or add) the line: innodb_lock_wait_timeout = 50 And change the setting to a larger number, say 300. It's in seconds. Restart mysql and rerun your query. Alternatively, you can dump the data, drop the table, ...


2

Perform a search on this site for 'MaxClients' which should turn up quite a bit of information to get you started. There may be a few directives you want to look at depending on your server resources that could affect the number of simultaneous connections and thus performance of your web server. Here are a few examples (some may or may not need to be ...


2

I think what you are looking for is the file /proc/locks. It shows the current file locks in the system. This not shows how long a file has been locked, but it shows by which process. Maybe you could detect when the lock is register in this file and measure the elapsed time. A sample is this: cat /proc/locks 1: POSIX ADVISORY WRITE 2245 08:06:1182714 ...


1

Does this application only exhibit this issue when running WAS? If it's possible, I would see whether this behavior is repeatable in a different Java app server, such as JBoss or Tomcat. When doing the testing, however, it would be crucial to use the exact same Oracle JDBC driver that WAS uses. If not possible, I would inquire to the version of Oracle ...


1

The wait types shown in your screenshot are: LCK_M_X - Occurs when a task is waiting to acquire an Exclusive lock. CXPACKET - Occurs with parallel query plans when trying to synchronize the query processor exchange iterator. If waiting is excessive and cannot be reduced by tuning the query (such as adding indexes), consider adjusting the cost threshold ...


1

Why would you want to do explicit page level locking? You don't control what is on each page, so you'd be locking some arbitrary collection of data. What purpose would that serve? I think you're looking for row-level locking, which is accomplished using SELECT ... FOR UPDATE or SELECT ... FOR SHARE. PostgreSQL upgrades row-level locks to page-level locks ...


1

innotop can be used to display locks in a prettier format than the raw data, but it's more of a point in time view. If you're looking for something like long-term statistics and summaries, I'm not aware of anything.


1

You could disable X-forwarding in your SSH config for this server. For instance in your $HOME/.ssh/config you could have Host server ForwardX11 no


1

You can see the current network connections in Control Panel > Administrative Tools > Computer management > Shared folders > Sessions. You can also close a connection by Right clicking it and selecting "Close session", but I won't do for updating DLL's of a running program: Windows Can but Won’t [replace a DLL in use] Forcing handles closed


1

Another one to check is "HoboCopy". I don't know if it does what you need exactly but thought I'd throw this out there.


1

My guess is that was probably a backup script running from cron. "FLUSH TABLES WITH READ LOCK". This is especially used in backups to filesystems with snapshots. More info here.


1

show processlist And maybe enable slow query log


1

Why don't you look at the SHOW FULL PROCESSLIST and see what other threads are accessing the system, and kill off the ones that might be using the row. InnoDB has row-level locking, not column level. The fact that you changed the type_id means that it has selected a different row, and that row is locked.


1

Windows-centric: Uwe Sieber's RemoveDrive can do this, some of the time, even optionally suspending the indexing service to do so. On Vista x64 I've still sometimes found it necessary to manually close System's handle to the drive letter and/or the \Device\HarddiskVolumeX path RemoveDrive reports by using Process Explorer's Handle viewer, however. This ...


1

Can't remember where I found it, but Unlocker for Windows has done a dandy job of finding and unlocking whatever is tying up removable disks and files (I need to delete or move). Edit: Found the link again - http://ccollomb.free.fr/unlocker/


1

Just wanted to answer to myself. The solution can be found here: http://us3.php.net/manual/en/function.flock.php#82521


1

You can just use mysqldump command to get a snapshot of a running database without locking or freezing it.



Only top voted, non community-wiki answers of a minimum length are eligible